add options to setup ucs ntp
This commit is contained in:
parent
93418fb98a
commit
7036312f8d
@ -5,3 +5,6 @@ ntp_servers:
|
||||
- "server 2.pool.ntp.org"
|
||||
- "server 3.pool.ntp.org"
|
||||
ntp_timezone: Europe/Berlin
|
||||
|
||||
# Varaiables only used on UCS systems
|
||||
ntp_signed_requests: yes
|
||||
|
@ -1,2 +1,10 @@
|
||||
---
|
||||
- import_tasks: install.yml
|
||||
- import_tasks: setup_default.yml
|
||||
when:
|
||||
- common_sshd_configuration_enabled
|
||||
- not ansible_lsb.id is defined or not ansible_lsb.id == "Univention"
|
||||
- include_tasks: setup_ucs.yml
|
||||
when:
|
||||
- common_sshd_configuration_enabled
|
||||
- ansible_lsb.id is defined
|
||||
- ansible_lsb.id == "Univention"
|
||||
|
20
tasks/setup_ucs.yml
Normal file
20
tasks/setup_ucs.yml
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
- block:
|
||||
- name: Configure ntp servers
|
||||
ucr:
|
||||
path: "{{ item.path }}"
|
||||
value: "{{ item.value }}"
|
||||
with_items:
|
||||
- { path: timeserver, value: "{{ ntp_servers[0] | default('') }}" }
|
||||
- { path: timeserver2, value: "{{ ntp_servers[1] | default('') }}" }
|
||||
- { path: timeserver3, value: "{{ ntp_servers[2] | default('') }}" }
|
||||
loop_control:
|
||||
label: "variable: {{ item.path }}={{ item.value }}"
|
||||
notify: __ntpd_restart
|
||||
|
||||
- name: Configure signed ntp time requests
|
||||
ucr:
|
||||
path: "ntp/signed"
|
||||
value: "{{ ntp_signed_requests }}"
|
||||
become: True
|
||||
become_user: root
|
Loading…
Reference in New Issue
Block a user