Merge "Use correct index of previous task results"
This commit is contained in:
commit
40b576c7a0
|
@ -86,12 +86,14 @@
|
||||||
- name: Define libvirt nova extra secret(s)
|
- name: Define libvirt nova extra secret(s)
|
||||||
command: "virsh secret-define --file /tmp/{{ item.mon_host }}{{ item.client_name }}-secret.xml"
|
command: "virsh secret-define --file /tmp/{{ item.mon_host }}{{ item.client_name }}-secret.xml"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
with_items: "{{ ceph_extra_confs }}"
|
loop: "{{ ceph_extra_confs }}"
|
||||||
|
loop_control:
|
||||||
|
index_var: index
|
||||||
when:
|
when:
|
||||||
- item.client_name is defined
|
- "'client_name' in item"
|
||||||
- item.mon_host is defined
|
- "'mon_host' in item"
|
||||||
- item.secret_uuid is defined
|
- "'secret_uuid' in item"
|
||||||
- item.secret_uuid not in libvirt_secret_exists.results[0].stdout_lines
|
- item.secret_uuid not in libvirt_secret_exists.results[index].stdout_lines
|
||||||
notify:
|
notify:
|
||||||
- Restart os services
|
- Restart os services
|
||||||
|
|
||||||
|
@ -117,12 +119,14 @@
|
||||||
|
|
||||||
- name: Set extra secret value(s) in libvirt
|
- name: Set extra secret value(s) in libvirt
|
||||||
shell: "virsh secret-set-value --secret {{ item.secret_uuid }} --base64 $(cat /tmp/{{ item.mon_host }}{{ item.client_name }}.key.tmp)"
|
shell: "virsh secret-set-value --secret {{ item.secret_uuid }} --base64 $(cat /tmp/{{ item.mon_host }}{{ item.client_name }}.key.tmp)"
|
||||||
with_items: "{{ ceph_extra_confs }}"
|
loop: "{{ ceph_extra_confs }}"
|
||||||
|
loop_control:
|
||||||
|
index_var: index
|
||||||
when:
|
when:
|
||||||
- item.client_name is defined
|
- "'client_name' in item"
|
||||||
- item.mon_host is defined
|
- "'mon_host' in item"
|
||||||
- item.secret_uuid is defined
|
- "'secret_uuid' in item"
|
||||||
- item.secret_uuid not in libvirt_secret_value_exists.results[0].stdout_lines
|
- item.secret_uuid not in libvirt_secret_value_exists.results[index].stdout_lines
|
||||||
notify:
|
notify:
|
||||||
- Restart os services
|
- Restart os services
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue