xoxys.ntp/tasks/setup_default.yml

24 lines
485 B
YAML

---
- name: Setup ntp server
block:
- name: Install ntp server
package:
name: ntp
state: present
notify: __ntpd_restart
- name: Configure ntp servers
template:
src: etc/ntp.conf.j2
dest: /etc/ntp.conf
owner: root
group: root
mode: 0644
notify: __ntpd_restart
- name: Setup timezone '{{ ntp_timezone }}'
timezone:
name: "{{ ntp_timezone }}"
become: True
become_user: root