diff --git a/roles/mgrote.ntp_chrony_client/handlers/main.yml b/roles/mgrote.ntp_chrony_client/handlers/main.yml index f62bf2d0..f1c7c2d2 100644 --- a/roles/mgrote.ntp_chrony_client/handlers/main.yml +++ b/roles/mgrote.ntp_chrony_client/handlers/main.yml @@ -4,3 +4,9 @@ name: chrony enabled: yes state: restarted + + - name: mask ntp service + become: yes + systemd: + name: ntp + masked: yes diff --git a/roles/mgrote.ntp_chrony_client/tasks/main.yml b/roles/mgrote.ntp_chrony_client/tasks/main.yml index 5312772c..27864329 100644 --- a/roles/mgrote.ntp_chrony_client/tasks/main.yml +++ b/roles/mgrote.ntp_chrony_client/tasks/main.yml @@ -6,12 +6,12 @@ state: stopped masked: yes - - name: mask ntp service + - name: stop ntp service become: yes systemd: name: ntp state: stopped - masked: yes + notify: mask ntp service - name: install chrony packages become: yes diff --git a/roles/mgrote.ntp_chrony_server/handlers/main.yml b/roles/mgrote.ntp_chrony_server/handlers/main.yml index f62bf2d0..f1c7c2d2 100644 --- a/roles/mgrote.ntp_chrony_server/handlers/main.yml +++ b/roles/mgrote.ntp_chrony_server/handlers/main.yml @@ -4,3 +4,9 @@ name: chrony enabled: yes state: restarted + + - name: mask ntp service + become: yes + systemd: + name: ntp + masked: yes diff --git a/roles/mgrote.ntp_chrony_server/tasks/main.yml b/roles/mgrote.ntp_chrony_server/tasks/main.yml index 75b6cf76..b7fcff84 100644 --- a/roles/mgrote.ntp_chrony_server/tasks/main.yml +++ b/roles/mgrote.ntp_chrony_server/tasks/main.yml @@ -6,12 +6,12 @@ state: stopped masked: yes - - name: mask ntp service + - name: stop ntp service become: yes systemd: name: ntp state: stopped - masked: yes + notify: mask ntp service - name: install chrony packages become: yes