summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJirayut Nimsaeng <wingth@gmail.com>2017-05-09 14:24:54 +0700
committerJirayut Nimsaeng <wingth@gmail.com>2017-05-09 14:24:54 +0700
commit8d6b43ee781b412c6e28b49dfcaa220f2d041743 (patch)
tree60bb2a5b4185a74aaecbfe929207f86a5facfffc
parentd7eba652db7cba3638400070dea90992ec92fdeb (diff)
downloadntp-8d6b43ee781b412c6e28b49dfcaa220f2d041743.tar.gz
ntp-8d6b43ee781b412c6e28b49dfcaa220f2d041743.tar.bz2
ntp-8d6b43ee781b412c6e28b49dfcaa220f2d041743.tar.xz
ntp-8d6b43ee781b412c6e28b49dfcaa220f2d041743.zip
Improve syntax consistency
-rw-r--r--handlers/main.yml4
-rw-r--r--tasks/main.yml8
-rw-r--r--tests/test.yml4
3 files changed, 12 insertions, 4 deletions
diff --git a/handlers/main.yml b/handlers/main.yml
index 37d0e52..ecf7353 100644
--- a/handlers/main.yml
+++ b/handlers/main.yml
@@ -1,4 +1,6 @@
---
- name: restart ntp
- service: "name={{ ntp_daemon }} state=restarted"
+ service:
+ name: "{{ ntp_daemon }}"
+ state: restarted
when: ntp_enabled
diff --git a/tasks/main.yml b/tasks/main.yml
index c5a4d7f..afe3731 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -18,7 +18,9 @@
when: ansible_os_family == 'Debian'
- name: Install NTP.
- package: name=ntp state=present
+ package:
+ name: ntp
+ state: present
- name: Ensure NTP is running and enabled as configured.
service:
@@ -35,6 +37,8 @@
when: not ntp_enabled
- name: Generate ntp.conf file
- template: src=ntp.conf.j2 dest=/etc/ntp.conf
+ template:
+ src: ntp.conf.j2
+ dest: /etc/ntp.conf
notify: restart ntp
when: ntp_manage_config
diff --git a/tests/test.yml b/tests/test.yml
index cd5a418..a51eedd 100644
--- a/tests/test.yml
+++ b/tests/test.yml
@@ -6,7 +6,9 @@
pre_tasks:
- name: Update apt cache.
- apt: update_cache=yes cache_valid_time=600
+ apt:
+ update_cache: yes
+ cache_valid_time: 600
when: ansible_os_family == 'Debian'
roles: