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"
|
state: "stopped"
|
||||||
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
|
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
|
||||||
with_dict: "{{ designate_services }}"
|
with_dict: "{{ designate_services }}"
|
||||||
when: inventory_hostname in groups[item.value.group]
|
when: "item.value.group in group_names"
|
||||||
register: _stop
|
register: _stop
|
||||||
until: _stop | success
|
until: _stop | success
|
||||||
retries: 5
|
retries: 5
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
state: "started"
|
state: "started"
|
||||||
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
|
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
|
||||||
with_dict: "{{ designate_services }}"
|
with_dict: "{{ designate_services }}"
|
||||||
when: inventory_hostname in groups[item.value.group]
|
when: "item.value.group in group_names"
|
||||||
register: _start
|
register: _start
|
||||||
until: _start | success
|
until: _start | success
|
||||||
retries: 5
|
retries: 5
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
group: "{{ designate_system_group_name }}"
|
group: "{{ designate_system_group_name }}"
|
||||||
mode: "02755"
|
mode: "02755"
|
||||||
with_dict: "{{ designate_services }}"
|
with_dict: "{{ designate_services }}"
|
||||||
when: inventory_hostname in groups[item.value.group]
|
when: "item.value.group in group_names"
|
||||||
|
|
||||||
- name: Create TEMP lock dir
|
- name: Create TEMP lock dir
|
||||||
file:
|
file:
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
group: "{{ designate_system_group_name }}"
|
group: "{{ designate_system_group_name }}"
|
||||||
mode: "02755"
|
mode: "02755"
|
||||||
with_dict: "{{ designate_services }}"
|
with_dict: "{{ designate_services }}"
|
||||||
when: inventory_hostname in groups[item.value.group]
|
when: "item.value.group in group_names"
|
||||||
|
|
||||||
- name: Create tempfile.d entry
|
- name: Create tempfile.d entry
|
||||||
template:
|
template:
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
with_dict: "{{ designate_services }}"
|
with_dict: "{{ designate_services }}"
|
||||||
when: inventory_hostname in groups[item.value.group]
|
when: "item.value.group in group_names"
|
||||||
notify:
|
notify:
|
||||||
- Restart designate services
|
- Restart designate services
|
||||||
|
|
||||||
|
@ -55,6 +55,6 @@
|
||||||
config_overrides: "{{ item.value.init_config_overrides }}"
|
config_overrides: "{{ item.value.init_config_overrides }}"
|
||||||
config_type: "ini"
|
config_type: "ini"
|
||||||
with_dict: "{{ designate_services }}"
|
with_dict: "{{ designate_services }}"
|
||||||
when: inventory_hostname in groups[item.value.group]
|
when: "item.value.group in group_names"
|
||||||
notify:
|
notify:
|
||||||
- Restart designate services
|
- Restart designate services
|
||||||
|
|
Loading…
Reference in New Issue