diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | meta/main.yml | 2 | ||||
-rw-r--r-- | tasks/main.yml | 22 |
3 files changed, 15 insertions, 11 deletions
@@ -10,7 +10,7 @@ None. ## Role Variables -Available variables are listed below, along with default values (see `vars/main.yml`): +Available variables are listed below, along with default values (see `defaults/main.yml`): ntp_enabled: true diff --git a/meta/main.yml b/meta/main.yml index 2731fc2..dc85d17 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -3,7 +3,7 @@ dependencies: [] galaxy_info: author: geerlingguy - description: NTP installation and configuration for RHEL/CentOS 6.x. + description: NTP installation and configuration for Linux. company: "Midwestern Mac, LLC" license: "license (BSD, MIT)" min_ansible_version: 1.4 diff --git a/tasks/main.yml b/tasks/main.yml index b71ac16..2844315 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -3,7 +3,11 @@ include_vars: "{{ ansible_os_family }}.yml" - name: Set the correct timezone. - file: src=/usr/share/zoneinfo/{{ ntp_timezone }} dest=/etc/localtime state=link force=yes + file: + src: "/usr/share/zoneinfo/{{ ntp_timezone }}" + dest: /etc/localtime + state: link + force: yes - name: Install NTP (RedHat). yum: name=ntp state=installed @@ -18,15 +22,15 @@ when: ansible_os_family == 'FreeBSD' - name: Ensure NTP is running and enabled at system start. - service: > - name={{ ntp_daemon }} - state=started - enabled=yes + 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 + service: + name: "{{ ntp_daemon }}" + state: stopped + enabled: no when: not ntp_enabled |