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:
parent
fbc92af391
commit
c3f9d46bf5
4 changed files with 14 additions and 1 deletions
|
@ -21,5 +21,9 @@ ntp_servers:
|
||||||
# Enable or disable ntp statistics
|
# Enable or disable ntp statistics
|
||||||
ntp_statistics: false
|
ntp_statistics: false
|
||||||
|
|
||||||
|
# optionally set timezone
|
||||||
|
ntp_set_time_zone: false
|
||||||
|
ntp_timezone: 'Europe/Berlin'
|
||||||
|
|
||||||
# version check for this playbook (true is recomended)
|
# version check for this playbook (true is recomended)
|
||||||
submodules_versioncheck: false
|
submodules_versioncheck: false
|
||||||
|
|
|
@ -11,3 +11,7 @@
|
||||||
|
|
||||||
- name: Configure ntp
|
- name: Configure ntp
|
||||||
ansible.builtin.include_tasks: config.yml
|
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
5
tasks/set_time_zone.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
- name: "Set timezone to {{ ntp_timezone }}"
|
||||||
|
become: true
|
||||||
|
community.general.timezone:
|
||||||
|
name: "{{ ntp_timezone }}"
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
playbook_version_number: 2054
|
playbook_version_number: 2055
|
||||||
playbook_version_path: 'role-ntp_chaos-bodensee_github.com.version'
|
playbook_version_path: 'role-ntp_chaos-bodensee_github.com.version'
|
||||||
|
|
||||||
ntp__vars:
|
ntp__vars:
|
||||||
|
|
Loading…
Reference in a new issue