diff --git a/ansible/main.yml b/ansible/main.yml index 5822893..ed62ff6 100644 --- a/ansible/main.yml +++ b/ansible/main.yml @@ -1,7 +1,6 @@ - hosts: all - tasks: - - name: Ping - ping: + roles: + - ntp - hosts: casey roles: diff --git a/ansible/roles/ntp/tasks/main.yml b/ansible/roles/ntp/tasks/main.yml new file mode 100644 index 0000000..f3e5a4f --- /dev/null +++ b/ansible/roles/ntp/tasks/main.yml @@ -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