summaryrefslogtreecommitdiffstats
path: root/tasks/main.yml
diff options
context:
space:
mode:
authorJeff Geerling <geerlingguy@mac.com>2016-03-03 22:45:52 -0600
committerJeff Geerling <geerlingguy@mac.com>2016-03-03 22:45:52 -0600
commit9c0a3ce4ff0c8bc00dbb8497193c2fc5f015c5aa (patch)
tree103fd05671d52dfab54cb7c38d08a747bff057c6 /tasks/main.yml
parent567078d7c3ac7190d6748f0cfcd535e82912a12b (diff)
downloadntp-9c0a3ce4ff0c8bc00dbb8497193c2fc5f015c5aa.tar.gz
ntp-9c0a3ce4ff0c8bc00dbb8497193c2fc5f015c5aa.tar.bz2
ntp-9c0a3ce4ff0c8bc00dbb8497193c2fc5f015c5aa.tar.xz
ntp-9c0a3ce4ff0c8bc00dbb8497193c2fc5f015c5aa.zip
NTP configuration cleanup and add documentation for new vars.
Diffstat (limited to 'tasks/main.yml')
-rw-r--r--tasks/main.yml13
1 files changed, 6 insertions, 7 deletions
diff --git a/tasks/main.yml b/tasks/main.yml
index b6213ba..6a58382 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -8,28 +8,27 @@
dest: /etc/localtime
state: link
force: yes
- when: ntp_enabled
- name: Install NTP (RedHat).
yum: name=ntp state=installed
- when: ansible_os_family == 'RedHat' and ntp_enabled
+ when: ansible_os_family == 'RedHat'
- name: Install NTP (Debian).
apt: name=ntp state=installed
- when: ansible_os_family == 'Debian' and ntp_enabled
+ when: ansible_os_family == 'Debian'
- name: Install NTP (FreeBSD).
pkgng: name=ntp state=present
- when: ansible_os_family == 'FreeBSD' and ntp_enabled
+ when: ansible_os_family == 'FreeBSD'
-- name: Ensure NTP is running and enabled at system start.
+- name: Ensure NTP is running and enabled as configured.
service:
name: "{{ ntp_daemon }}"
state: started
enabled: yes
when: ntp_enabled
-- name: Ensure NTP is stopped and disabled at system start.
+- name: Ensure NTP is stopped and disabled as configured.
service:
name: "{{ ntp_daemon }}"
state: stopped
@@ -39,4 +38,4 @@
- name: Generate ntp.conf file
template: src=ntp.conf.j2 dest=/etc/ntp.conf
notify: restart ntp
- when: ntp_enabled
+ when: ntp_manage_config