Newer
Older
---
- name: install ntp.conf
template: src=ntp.conf.j2 dest=/etc/ntp.conf mode=644 owner=root group=root
become: true
become_user: root
service: name=ntpd state=restarted
become: true
become_user: root
when:
- ansible_os_family == "RedHat"
- ntpinstall.changed
- name: ensure ntpd is enabled and started redhat
service: name=ntpd state=started enabled=yes
become: true
become_user: root
when: ansible_os_family == "RedHat"
- name: restart ntpd ubuntu
service: name=ntp state=restarted
become: true
become_user: root
when:
- ansible_os_family == "Debian"
- ntpinstall.changed
- name: ensure ntpd is enabled and started ubuntu
service: name=ntp state=started enabled=yes
become: true
become_user: root
when: ansible_os_family == "Debian"
- name: set local timezone
file: path=/etc/localtime state=link src={{ TIMEZONE_PATH }}
become: true
become_user: root