diff options
Diffstat (limited to 'tasks/main.yml')
-rw-r--r-- | tasks/main.yml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tasks/main.yml b/tasks/main.yml index 144c455..8ee5d87 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -13,9 +13,16 @@ apt: name=ntp state=installed when: ansible_os_family == 'Debian' -- name: Ensure NTP is running. +- name: Ensure NTP is running and enabled at system start. service: > name={{ ntp_daemon }} state=started enabled=yes when: ntp_enabled + +- name: Ensure NTP is stopped and disabled at system start. + service: > + name={{ ntp_daemon }} + state=stopped + enabled=no + when: !ntp_enabled |