1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_ntp.git synced 2024-08-16 12:59:49 +02:00

Optionally set timezone

This commit is contained in:
L3D 2022-11-16 23:48:04 +01:00
parent fbc92af391
commit c3f9d46bf5
Signed by: l3d
GPG key ID: CD08445BFF4313D1
4 changed files with 14 additions and 1 deletions

View file

@ -21,5 +21,9 @@ ntp_servers:
# Enable or disable ntp statistics
ntp_statistics: false
# optionally set timezone
ntp_set_time_zone: false
ntp_timezone: 'Europe/Berlin'
# version check for this playbook (true is recomended)
submodules_versioncheck: false

View file

@ -11,3 +11,7 @@
- name: Configure ntp
ansible.builtin.include_tasks: config.yml
- name: Optionally set NTP Timezone
ansible.builtin.include_tasks: set_time_zone.yml
when: ntp_set_time_zone | bool

5
tasks/set_time_zone.yml Normal file
View file

@ -0,0 +1,5 @@
---
- name: "Set timezone to {{ ntp_timezone }}"
become: true
community.general.timezone:
name: "{{ ntp_timezone }}"

View file

@ -1,5 +1,5 @@
---
playbook_version_number: 2054
playbook_version_number: 2055
playbook_version_path: 'role-ntp_chaos-bodensee_github.com.version'
ntp__vars: