Skip to content

Commit 9c736c6

Browse files
committed
feat: add restart condition
1 parent 522e3fd commit 9c736c6

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

handlers/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
name: dhcpcd
44
state: restarted
55
daemon_reload: true
6+
when: not dhcpcd_service_started.changed

tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
name: dhcpcd
1919
state: started
2020
daemon_reload: true
21+
register: dhcpcd_service_started
2122

2223
- name: Enable service
2324
ansible.builtin.systemd:

0 commit comments

Comments
 (0)