You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
k3s/tests/e2e/e2e_test_playbook.yaml

35 lines
1.1 KiB

---
- name: Run Cluster validation tests
gather_facts: false
hosts: node
vars:
user: "{{ user }}"
key: "{{ key }}"
ip: "{{ ip }}"
dir: scripts
tasks:
- name : Print var
debug:
msg: |
user: {{ user }}
key: {{ key }}
ip: {{ ip }}
db: {{ db }}
nodeOS: {{ nodeOS }}
serverCount: {{ serverCount }}
agentCount: {{ agentCount }}
- name: build container image
command: chdir=k3s/tests/e2e /usr/local/bin/docker build -t k3s_nightly_build -f {{ dir }}/Dockerfile .
- name: Delete docker container
command: "/usr/local/bin/docker rm createcluster -f"
ignore_errors: True
- name: create docker container
command: "/usr/local/bin/docker run -d -it -v ~/config:/config --cap-add=NET_ADMIN --device /dev/net/tun --sysctl net.ipv6.conf.all.disable_ipv6=0 --name createcluster --privileged k3s_nightly_build"
- name: execute command in docker
shell: |
/usr/local/bin/docker exec -it createcluster /bin/bash ./run_tests.sh {{ key }} {{ user }} {{ ip }} {{ db }} {{ nodeOS }} {{ serverCount }} {{ agentCount }}