Test idempotence of deploy and teardown in CI

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
This commit is contained in:
Mark Goddard 2019-05-23 11:10:16 +01:00
parent 0719f06a6b
commit f24d23346e
1 changed files with 18 additions and 0 deletions

View File

@ -27,6 +27,15 @@
ansible/deploy.yml > {{ logs_dir }}/ansible/tenks-deploy ansible/deploy.yml > {{ logs_dir }}/ansible/tenks-deploy
chdir: "{{ tenks_src_dir }}" 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 - name: Get some diagnostic info for the tenks cluster
include_role: include_role:
name: tenks-diagnostics name: tenks-diagnostics
@ -42,3 +51,12 @@
--extra-vars=@{{ tenks_overrides_path }} --extra-vars=@{{ tenks_overrides_path }}
ansible/teardown.yml > {{ logs_dir }}/ansible/tenks-teardown ansible/teardown.yml > {{ logs_dir }}/ansible/tenks-teardown
chdir: "{{ tenks_src_dir }}" 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 }}"