Use group_names to check a host belongs to group
Change-Id: I65f7b6265e7e35ea0cde4cdad0b7f6d32cab1871
This commit is contained in:
parent
ceb12b1088
commit
4f21a97aef
|
@ -28,7 +28,7 @@
|
|||
state: "stopped"
|
||||
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
|
||||
with_dict: "{{ designate_services }}"
|
||||
when: inventory_hostname in groups[item.value.group]
|
||||
when: "item.value.group in group_names"
|
||||
register: _stop
|
||||
until: _stop | success
|
||||
retries: 5
|
||||
|
@ -58,7 +58,7 @@
|
|||
state: "started"
|
||||
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
|
||||
with_dict: "{{ designate_services }}"
|
||||
when: inventory_hostname in groups[item.value.group]
|
||||
when: "item.value.group in group_names"
|
||||
register: _start
|
||||
until: _start | success
|
||||
retries: 5
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
group: "{{ designate_system_group_name }}"
|
||||
mode: "02755"
|
||||
with_dict: "{{ designate_services }}"
|
||||
when: inventory_hostname in groups[item.value.group]
|
||||
when: "item.value.group in group_names"
|
||||
|
||||
- name: Create TEMP lock dir
|
||||
file:
|
||||
|
@ -31,7 +31,7 @@
|
|||
group: "{{ designate_system_group_name }}"
|
||||
mode: "02755"
|
||||
with_dict: "{{ designate_services }}"
|
||||
when: inventory_hostname in groups[item.value.group]
|
||||
when: "item.value.group in group_names"
|
||||
|
||||
- name: Create tempfile.d entry
|
||||
template:
|
||||
|
@ -41,7 +41,7 @@
|
|||
owner: "root"
|
||||
group: "root"
|
||||
with_dict: "{{ designate_services }}"
|
||||
when: inventory_hostname in groups[item.value.group]
|
||||
when: "item.value.group in group_names"
|
||||
notify:
|
||||
- Restart designate services
|
||||
|
||||
|
@ -55,6 +55,6 @@
|
|||
config_overrides: "{{ item.value.init_config_overrides }}"
|
||||
config_type: "ini"
|
||||
with_dict: "{{ designate_services }}"
|
||||
when: inventory_hostname in groups[item.value.group]
|
||||
when: "item.value.group in group_names"
|
||||
notify:
|
||||
- Restart designate services
|
||||
|
|
Loading…
Reference in New Issue