From d0d2d6668eb5fac46d3270b843bf3acbb828fd5a Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 8 Dec 2019 21:17:30 +0000 Subject: [PATCH] Install NTP --- ansible/main.yml | 5 ++--- ansible/roles/ntp/tasks/main.yml | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 ansible/roles/ntp/tasks/main.yml 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