tenks/playbooks/tenks-deploy-teardown/run.yml
Radosław Piliszek 6ca0bb7bd6 [CI] Optimise ovs setup
Change-Id: I28ec8e02054ea75efffe472672ff3ed46c6f2cf7
2022-09-10 09:11:01 +00:00

64 lines
2.1 KiB
YAML

---
- hosts: all
vars:
ansible_playbook_bin: "{{ tenks_venv }}/bin/ansible-playbook"
tasks:
- name: Include common variables
include_vars: common.yml
- name: Include OS-specific variables
include_vars: "{{ item }}"
with_first_found:
- files:
- "{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}.yml"
- "{{ ansible_facts.distribution }}.yml"
- "{{ ansible_facts.os_family }}.yml"
skip: true
- name: Ensure Open vSwitch is set up
include_tasks: tasks/ensure_openvswitch.yml
when: bridge_type == 'openvswitch'
- name: Deploy tenks cluster
shell:
cmd: >-
{{ ansible_playbook_bin }} -vvv
--inventory ansible/inventory
--extra-vars=@{{ tenks_overrides_path }}
ansible/deploy.yml > {{ logs_dir }}/ansible/tenks-deploy
chdir: "{{ tenks_src_dir }}"
- name: Test idempotence of deploy
shell:
cmd: >-
{{ ansible_playbook_bin }} -vvv
--inventory ansible/inventory
--extra-vars=@{{ tenks_overrides_path }}
ansible/deploy.yml > {{ logs_dir }}/ansible/tenks-deploy-idempotence
chdir: "{{ tenks_src_dir }}"
- name: Get some diagnostic info for the tenks cluster
include_role:
name: tenks-diagnostics
vars:
tenks_diagnostics_phase: "created"
tenks_diagnostics_log_dir: "{{ logs_dir }}"
- name: Teardown tenks cluster
shell:
cmd: >-
{{ ansible_playbook_bin }} -vvv
--inventory ansible/inventory
--extra-vars=@{{ tenks_overrides_path }}
ansible/teardown.yml > {{ logs_dir }}/ansible/tenks-teardown
chdir: "{{ tenks_src_dir }}"
- name: Test idempotence of teardown
shell:
cmd: >-
{{ ansible_playbook_bin }} -vvv
--inventory ansible/inventory
--extra-vars=@{{ tenks_overrides_path }}
ansible/teardown.yml > {{ logs_dir }}/ansible/tenks-teardown-idempotence
chdir: "{{ tenks_src_dir }}"