From 649b209845a576ddf29228db5bd340ebd6a7daf6 Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Sun, 16 Mar 2014 21:17:40 -0500 Subject: Add support for Debian/Ubuntu systems. --- tasks/main.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'tasks') diff --git a/tasks/main.yml b/tasks/main.yml index 11211c2..0e39a79 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,10 +1,17 @@ --- -# Date and timezone (NTP). +- name: Include OS-specific variables. + 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 -- name: Install NTP. +- name: Install NTP on RHEL flavors. yum: name=ntp state=installed + when: ansible_os_family == 'RedHat' + +- name: Install NTP on Debian flavors. + apt: name=ntp state=installed + when: ansible_os_family == 'Debian' - name: Ensure NTP is running. - service: name=ntpd state=started enabled=yes + service: name={{ ntp_daemon }} state=started enabled=yes -- cgit v1.2.3