summaryrefslogtreecommitdiffstats
path: root/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'tasks')
-rw-r--r--tasks/main.yml13
1 files changed, 8 insertions, 5 deletions
diff --git a/tasks/main.yml b/tasks/main.yml
index 8a14050..a022447 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -2,15 +2,18 @@
- name: Include OS-specific variables.
include_vars: "{{ ansible_os_family }}.yml"
+- name: Ensure NTP-related packages are installed.
+ package:
+ name: "{{ item }}"
+ state: present
+ with_items:
+ - ntp
+ - tzdata
+
- name: Set timezone
timezone:
name: "{{ ntp_timezone }}"
-- name: Install NTP.
- package:
- name: ntp
- state: present
-
- name: Ensure NTP is running and enabled as configured.
service:
name: "{{ ntp_daemon }}"