Install NTP
This commit is contained in:
parent
23a472f764
commit
d0d2d6668e
2 changed files with 17 additions and 3 deletions
|
@ -1,7 +1,6 @@
|
||||||
- hosts: all
|
- hosts: all
|
||||||
tasks:
|
roles:
|
||||||
- name: Ping
|
- ntp
|
||||||
ping:
|
|
||||||
|
|
||||||
- hosts: casey
|
- hosts: casey
|
||||||
roles:
|
roles:
|
||||||
|
|
15
ansible/roles/ntp/tasks/main.yml
Normal file
15
ansible/roles/ntp/tasks/main.yml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
- name: "Install NTP"
|
||||||
|
apt:
|
||||||
|
name: "ntp"
|
||||||
|
become: true
|
||||||
|
become_user: root
|
||||||
|
|
||||||
|
- name: Set timezone
|
||||||
|
timezone:
|
||||||
|
name: Europe/London
|
||||||
|
|
||||||
|
- name: Enable NTP service
|
||||||
|
systemd:
|
||||||
|
name: ntp
|
||||||
|
enabled: true
|
||||||
|
state: started
|
Loading…
Reference in a new issue