21 lines
418 B
YAML
21 lines
418 B
YAML
---
|
|
- hosts: all
|
|
|
|
tasks:
|
|
|
|
- name: Install NTP
|
|
package: name=ntp state=latest
|
|
|
|
- name: Debug
|
|
debug: var=ntp_servers
|
|
|
|
- name: Template ntp.conf
|
|
template: src=ntp.conf.j2 dest=/etc/ntp.conf backup=yes
|
|
|
|
- name: Restart NTP
|
|
service: "name={{ ntp_service_name }} state=\"restarted\""
|
|
|
|
- name: Enable NTP
|
|
service: 'name="{{ ntp_service_name }}" enabled=yes state=started'
|
|
|