summaryrefslogtreecommitdiffstats
path: root/tasks
diff options
context:
space:
mode:
authorJirayut Nimsaeng <wingth@gmail.com>2017-05-09 20:26:42 +0700
committerJirayut Nimsaeng <wingth@gmail.com>2017-05-11 11:25:39 +0700
commit1c16875b55c0c20f71e9c78b67cd38ce34022bd6 (patch)
tree646bc97fa55e3793fc168c1fcb636481c2cabacc /tasks
parentbe80a0add73c8942405b5bc8ef68ca8d6de9fba5 (diff)
downloadntp-1c16875b55c0c20f71e9c78b67cd38ce34022bd6.tar.gz
ntp-1c16875b55c0c20f71e9c78b67cd38ce34022bd6.tar.bz2
ntp-1c16875b55c0c20f71e9c78b67cd38ce34022bd6.tar.xz
ntp-1c16875b55c0c20f71e9c78b67cd38ce34022bd6.zip
Use timezone module and bump required minimum Ansible version to 2.2
Diffstat (limited to 'tasks')
-rw-r--r--tasks/main.yml21
1 files changed, 1 insertions, 20 deletions
diff --git a/tasks/main.yml b/tasks/main.yml
index 491c04d..8a14050 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -2,28 +2,9 @@
- name: Include OS-specific variables.
include_vars: "{{ ansible_os_family }}.yml"
-- name: Configure timezone (For Ansible 2.2+)
+- name: Set timezone
timezone:
name: "{{ ntp_timezone }}"
- when: ansible_version.full >= "02.02.00.00"
-
-- name: Set the correct timezone. (For Ansible prior 2.2)
- file:
- src: "/usr/share/zoneinfo/{{ ntp_timezone }}"
- dest: /etc/localtime
- state: link
- force: yes
- when: ansible_version.full < "02.02.00.00"
-
-# Debian family OSes also have an /etc/timezone file.
-- name: Set timezone in /etc/timezone file. (For Ansible prior 2.2)
- template:
- src: timezone.j2
- dest: /etc/timezone
- force: yes
- when:
- - ansible_os_family == 'Debian'
- - ansible_version.full < "02.02.00.00"
- name: Install NTP.
package: