aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/systemd_depend_iface/handlers/main.yml13
-rw-r--r--roles/systemd_depend_iface/handlers/service.yml6
-rw-r--r--roles/systemd_depend_iface/tasks/main.yml5
-rw-r--r--roles/systemd_depend_mount/handlers/main.yml13
-rw-r--r--roles/systemd_depend_mount/handlers/service.yml6
-rw-r--r--roles/systemd_depend_mount/tasks/main.yml5
6 files changed, 6 insertions, 42 deletions
diff --git a/roles/systemd_depend_iface/handlers/main.yml b/roles/systemd_depend_iface/handlers/main.yml
index 813a651..1449130 100644
--- a/roles/systemd_depend_iface/handlers/main.yml
+++ b/roles/systemd_depend_iface/handlers/main.yml
@@ -2,15 +2,4 @@
become: true
ansible.builtin.systemd_service:
daemon_reload: true
- listen: systemd_depend_iface_restart
-
-- name: Collect installed services
- ansible.builtin.service_facts:
- listen: systemd_depend_iface_restart
-
-- name: Restart systemd services
- ansible.builtin.include_tasks: service.yml
- listen: systemd_depend_iface_restart
- loop: "{{ systemd_depend_iface_result.results | selectattr('changed', 'equalto', true) | map(attribute='service') | list }}"
- loop_control:
- loop_var: service
+ listen: systemd_depend_iface_reload
diff --git a/roles/systemd_depend_iface/handlers/service.yml b/roles/systemd_depend_iface/handlers/service.yml
deleted file mode 100644
index 10ead91..0000000
--- a/roles/systemd_depend_iface/handlers/service.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-- name: 'Restart {{ service }}'
- become: true
- ansible.builtin.systemd_service:
- name: '{{ service }}'
- state: restarted
- when: service in ansible_facts.services
diff --git a/roles/systemd_depend_iface/tasks/main.yml b/roles/systemd_depend_iface/tasks/main.yml
index 1bc8590..d99a445 100644
--- a/roles/systemd_depend_iface/tasks/main.yml
+++ b/roles/systemd_depend_iface/tasks/main.yml
@@ -18,11 +18,10 @@
owner: root
group: root
mode: '644'
- register: systemd_depend_iface_result
- notify: systemd_depend_iface_restart
+ notify: systemd_depend_iface_reload
loop: '{{ systemd_depend_iface_services }}'
loop_control:
loop_var: service
-- name: Restart systemd services if necessary
+- name: Reload systemd services if necessary
ansible.builtin.meta: flush_handlers
diff --git a/roles/systemd_depend_mount/handlers/main.yml b/roles/systemd_depend_mount/handlers/main.yml
index 207c203..b59b5a5 100644
--- a/roles/systemd_depend_mount/handlers/main.yml
+++ b/roles/systemd_depend_mount/handlers/main.yml
@@ -2,15 +2,4 @@
become: true
ansible.builtin.systemd_service:
daemon_reload: true
- listen: systemd_depend_mount_restart
-
-- name: Collect installed services
- ansible.builtin.service_facts:
- listen: systemd_depend_mount_restart
-
-- name: Restart systemd services
- ansible.builtin.include_tasks: service.yml
- listen: systemd_depend_mount_restart
- loop: "{{ systemd_depend_mount_result.results | selectattr('changed', 'equalto', true) | map(attribute='service') | list }}"
- loop_control:
- loop_var: service
+ listen: systemd_depend_mount_reload
diff --git a/roles/systemd_depend_mount/handlers/service.yml b/roles/systemd_depend_mount/handlers/service.yml
deleted file mode 100644
index 10ead91..0000000
--- a/roles/systemd_depend_mount/handlers/service.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-- name: 'Restart {{ service }}'
- become: true
- ansible.builtin.systemd_service:
- name: '{{ service }}'
- state: restarted
- when: service in ansible_facts.services
diff --git a/roles/systemd_depend_mount/tasks/main.yml b/roles/systemd_depend_mount/tasks/main.yml
index d759b00..32b83d6 100644
--- a/roles/systemd_depend_mount/tasks/main.yml
+++ b/roles/systemd_depend_mount/tasks/main.yml
@@ -18,11 +18,10 @@
owner: root
group: root
mode: '644'
- register: systemd_depend_mount_result
- notify: systemd_depend_mount_restart
+ notify: systemd_depend_mount_reload
loop: '{{ systemd_depend_mount_services }}'
loop_control:
loop_var: service
-- name: Restart systemd services if necessary
+- name: Reload systemd services if necessary
ansible.builtin.meta: flush_handlers