2016-03-14 02:00:12 +01:00
|
|
|
---
|
|
|
|
# Network time protocol
|
|
|
|
|
2018-11-11 05:26:19 +01:00
|
|
|
# Timezone
|
|
|
|
- name: Configuring timezone
|
|
|
|
shell: /sbin/e-smith/db configuration set TimeZone "Europe/Rome"
|
|
|
|
register: chg_timezone
|
|
|
|
|
|
|
|
# Configuring same timezone also on php
|
|
|
|
- name: Configuring timezone in PHP
|
|
|
|
shell: /sbin/e-smith/db configuration setprop php DateTimezone "Europe/Rome"
|
|
|
|
register: chg_timezone_php
|
|
|
|
|
|
|
|
- name: Activate timezone in PHP
|
|
|
|
shell: /sbin/e-smith/signal-event nethserver-php-update
|
|
|
|
when: chg_timezone_php|changed
|
2016-03-14 02:00:12 +01:00
|
|
|
|
|
|
|
- name: Checking for NTP Configuration
|
2018-11-11 05:26:19 +01:00
|
|
|
shell: /sbin/e-smith/db configuration printprop chronyd NTPServer
|
2016-03-14 02:00:12 +01:00
|
|
|
become: yes
|
|
|
|
register: chk_ntp
|
|
|
|
changed_when: "'NTPServer=ntp1.inrim.it' not in chk_ntp.stdout"
|
|
|
|
ignore_errors: true
|
|
|
|
|
|
|
|
- name: Configuring NTP
|
2018-11-11 05:26:19 +01:00
|
|
|
shell: /sbin/e-smith/db configuration setprop chronyd NTPServer ntp1.inrim.it status enabled
|
2016-03-14 02:00:12 +01:00
|
|
|
become: yes
|
|
|
|
when: chk_ntp|changed
|
|
|
|
|
|
|
|
- name: Activating NTP
|
2018-11-11 05:26:19 +01:00
|
|
|
shell: /sbin/e-smith/signal-event nethserver-ntp-save
|
2016-03-14 02:00:12 +01:00
|
|
|
become: yes
|
|
|
|
when: chk_ntp|changed
|