blob: 0e39a79bf4c0243fab045c655f02f79776476fb1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
---
- 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 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={{ ntp_daemon }} state=started enabled=yes
|