Improve inventory scoping for limited play execution
When executing the playbook with limits set, the scoping currently does not work quite as well as one would hope. This tightens it a bit more to ensure that it operates as expected. Change-Id: I1122196cf125f8f993a3c72e7c3767cd7fb3549d
This commit is contained in:
committed by
Jesse Pretorius (odyssey4me)
parent
22f81ada12
commit
823ced910a
@@ -55,7 +55,7 @@
|
|||||||
when:
|
when:
|
||||||
- "groups['cinder_api'] | length > 0"
|
- "groups['cinder_api'] | length > 0"
|
||||||
- "'cinder_api' in group_names"
|
- "'cinder_api' in group_names"
|
||||||
- "inventory_hostname == ansible_play_hosts[0]"
|
- "inventory_hostname == (groups['cinder_api'] | intersect(ansible_play_hosts))[0]"
|
||||||
tags:
|
tags:
|
||||||
- cinder-config
|
- cinder-config
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
when:
|
when:
|
||||||
- "groups['cinder_api'] | length > 0"
|
- "groups['cinder_api'] | length > 0"
|
||||||
- "'cinder_api' in group_names"
|
- "'cinder_api' in group_names"
|
||||||
- "inventory_hostname == ansible_play_hosts[0]"
|
- "inventory_hostname == (groups['cinder_api'] | intersect(ansible_play_hosts))[0]"
|
||||||
tags:
|
tags:
|
||||||
- cinder-config
|
- cinder-config
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
when:
|
when:
|
||||||
- "groups['cinder_volume'] | length > 0"
|
- "groups['cinder_volume'] | length > 0"
|
||||||
- "'cinder_volume' in group_names"
|
- "'cinder_volume' in group_names"
|
||||||
- "inventory_hostname == ansible_play_hosts[0]"
|
- "inventory_hostname == (groups['cinder_volume'] | intersect(ansible_play_hosts))[0]"
|
||||||
tags:
|
tags:
|
||||||
- cinder-config
|
- cinder-config
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user