summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Geerling <geerlingguy@mac.com>2015-07-17 21:20:31 -0500
committerJeff Geerling <geerlingguy@mac.com>2016-03-03 22:32:08 -0600
commitdf7f9eb615cf94cb6ba0163c361fc4bdb7956f72 (patch)
treef2d0f60cb3dd682c3333f8b835d21f65b996ec90
parenta62270617e954dd017b5389de32ffeb8103c0f09 (diff)
downloadntp-df7f9eb615cf94cb6ba0163c361fc4bdb7956f72.tar.gz
ntp-df7f9eb615cf94cb6ba0163c361fc4bdb7956f72.tar.bz2
ntp-df7f9eb615cf94cb6ba0163c361fc4bdb7956f72.tar.xz
ntp-df7f9eb615cf94cb6ba0163c361fc4bdb7956f72.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