myos/ansible/roles/disks/handlers/main.yml

22 lines
545 B
YAML

---
# file: handlers/main.yml
- name: restart services
with_together:
- '{{ disks_additional_disks }}'
- '{{ disks_additional_disks_handler_notify.results }}'
service:
name: "{{item.0.service}}"
state: restarted
when: item.1.changed and item.0.service is defined
- name: restart services - nfs
with_together:
- '{{ disks_additional_disks }}'
- '{{ disks_additional_disks_nfs_handler_notify.results }}'
service:
name: "{{item.0.service}}"
state: restarted
when: item.1.changed and item.0.service is defined