34 lines
977 B
YAML
Raw Permalink Normal View History

---
# Network time protocol
# 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
- name: Checking for NTP Configuration
shell: /sbin/e-smith/db configuration printprop chronyd NTPServer
become: yes
register: chk_ntp
changed_when: "'NTPServer=ntp1.inrim.it' not in chk_ntp.stdout"
ignore_errors: true
- name: Configuring NTP
shell: /sbin/e-smith/db configuration setprop chronyd NTPServer ntp1.inrim.it status enabled
become: yes
when: chk_ntp|changed
- name: Activating NTP
shell: /sbin/e-smith/signal-event nethserver-ntp-save
become: yes
when: chk_ntp|changed