Only use handler on filtered services
Since we create a filtered list of services we should use the handler to only restart those services, rather than all services. Additionally, we no longer need to check "service_en" since that will happen when the services are filtered. We can then check if the service exists before performing the metadata-proxy cleanup. Change-Id: I4ca3d90123e146d09cab20a0eda627014d9717e6 Depends-On: Ic152cfb01930d8bde10ea6d9aa5bba173a87e376
This commit is contained in:
parent
bc04011168
commit
45c7e49c42
@ -28,8 +28,7 @@
|
||||
enabled: yes
|
||||
state: "stopped"
|
||||
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
|
||||
with_dict: "{{ neutron_services }}"
|
||||
when: item.value.service_en | bool
|
||||
with_dict: "{{ filtered_neutron_services }}"
|
||||
register: _stop
|
||||
until: _stop | success
|
||||
retries: 5
|
||||
@ -53,7 +52,7 @@
|
||||
fi
|
||||
fi
|
||||
done
|
||||
when: neutron_services['neutron-metadata-agent'].service_en | bool
|
||||
when: '"neutron-metadata-agent" in filtered_neutron_services'
|
||||
|
||||
# Note (odyssey4me):
|
||||
# The policy.json file is currently read continually by the services
|
||||
@ -75,8 +74,7 @@
|
||||
enabled: yes
|
||||
state: "started"
|
||||
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
|
||||
with_dict: "{{ neutron_services }}"
|
||||
when: item.value.service_en | bool
|
||||
with_dict: "{{ filtered_neutron_services }}"
|
||||
register: _start
|
||||
until: _start | success
|
||||
retries: 5
|
||||
|
Loading…
Reference in New Issue
Block a user