diff --git a/handlers/main.yml b/handlers/main.yml index 33de479d..e8ddb8b9 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -13,15 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Reload systemd daemon - command: "systemctl daemon-reload" - notify: - - Restart cinder services - - name: Restart cinder services - service: + systemd: name: "{{ item.value.service_name }}" state: restarted + daemon_reload: yes with_dict: "{{ cinder_services }}" when: - inventory_hostname in groups[item.value.group] diff --git a/tasks/cinder_init_systemd.yml b/tasks/cinder_init_systemd.yml index c65d8c1d..450535b1 100644 --- a/tasks/cinder_init_systemd.yml +++ b/tasks/cinder_init_systemd.yml @@ -74,4 +74,4 @@ - inventory_hostname in groups[item.value.group] - "{{ item.value.condition | default(true) }}" notify: - - Reload systemd daemon + - Restart cinder services