summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Geerling <geerlingguy@mac.com>2015-07-17 21:20:31 -0500
committerJeff Geerling <geerlingguy@mac.com>2015-07-17 21:20:31 -0500
commit8d2c69407658f55788e522c6293a9c4c6c7c7344 (patch)
treef2d0f60cb3dd682c3333f8b835d21f65b996ec90
parent1fe4d7823916e3f00198b8326caed76f60a3aa1b (diff)
downloadntp-8d2c69407658f55788e522c6293a9c4c6c7c7344.tar.gz
ntp-8d2c69407658f55788e522c6293a9c4c6c7c7344.tar.bz2
ntp-8d2c69407658f55788e522c6293a9c4c6c7c7344.tar.xz
ntp-8d2c69407658f55788e522c6293a9c4c6c7c7344.zip
Fixed documentation and linux distro information.
-rw-r--r--README.md2
-rw-r--r--meta/main.yml2
-rw-r--r--tasks/main.yml22
3 files changed, 15 insertions, 11 deletions
diff --git a/README.md b/README.md
index 92ac061..49a459f 100644
--- a/README.md
+++ b/README.md
@@ -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