f24d23346e
Not currently checking for zero changed tasks (this would fail), but checking we can at least run the playbooks a second time. Change-Id: I045f9b0c222f2f35521319b3dc17c269f070e0dc
63 lines
2.0 KiB
YAML
63 lines
2.0 KiB
YAML
---
|
|
- hosts: all
|
|
vars:
|
|
ansible_playbook_bin: "{{ tenks_venv }}/bin/ansible-playbook"
|
|
tasks:
|
|
- name: Include common variables
|
|
include_vars: common.yml
|
|
|
|
- name: Install Open vSwitch
|
|
shell:
|
|
cmd: >-
|
|
{{ ansible_playbook_bin }} -vvv
|
|
--inventory ansible/inventory
|
|
--extra-vars=@{{ tenks_overrides_path }}
|
|
playbooks/openvswitch.yml > {{ logs_dir }}/ansible/tenks-deploy
|
|
chdir: "{{ tenks_src_dir }}"
|
|
environment:
|
|
ANSIBLE_ROLES_PATH: "{{ tenks_src_dir }}/ansible/roles"
|
|
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 }}"
|