mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Store System TZ into fpm/php.ini & cli/php.ini for Matomo etc
This commit is contained in:
parent
abf5e08f3f
commit
a02c452110
14 changed files with 71 additions and 57 deletions
|
@ -54,8 +54,9 @@
|
|||
include_tasks: validate_vars.yml
|
||||
when: not (rpi_model | regex_search('\\bW\\b')) # Ansible require double backslashes, e.g. with \b "word boundary" anchors: https://www.regular-expressions.info/wordboundaries.html https://stackoverflow.com/questions/56869119/ansible-regular-expression-to-match-a-string-and-extract-the-line/56869801#56869801
|
||||
|
||||
- name: "Time Zone / TZ: Set symlink /etc/localtime to UTC if it doesn't exist?"
|
||||
include_tasks: tz.yml
|
||||
# 2022-12-30: Functionality moved to www_options/tasks/php-settings.yml
|
||||
# - name: "Time Zone / TZ: Set symlink /etc/localtime to UTC if it doesn't exist?"
|
||||
# include_tasks: tz.yml
|
||||
|
||||
- name: Set hostname / domain (etc) in various places
|
||||
include_tasks: hostname.yml
|
||||
|
@ -103,10 +104,10 @@
|
|||
value: "{{ php_version }}"
|
||||
- option: first_run
|
||||
value: "{{ first_run }}"
|
||||
- option: local_tz # e.g. 'EDT' (summer) or 'EST' (winter) after Ansible interprets symlink /etc/localtime -- or 'UTC' if /etc/localtime doesn't exist
|
||||
value: "{{ local_tz }}"
|
||||
- option: etc_localtime.stdout # e.g. 'America/New_York' direct from symlink /etc/localtime -- or '' if /etc/localtime doesn't exist
|
||||
value: "{{ etc_localtime.stdout }}"
|
||||
# - option: local_tz # e.g. 'EDT' (summer) or 'EST' (winter) after Ansible interprets symlink /etc/localtime -- or 'UTC' if /etc/localtime doesn't exist
|
||||
# value: "{{ local_tz }}"
|
||||
# - option: etc_localtime.stdout # e.g. 'America/New_York' direct from symlink /etc/localtime -- or '' if /etc/localtime doesn't exist
|
||||
# value: "{{ etc_localtime.stdout }}"
|
||||
- option: FQDN_changed
|
||||
value: "{{ FQDN_changed }}"
|
||||
|
||||
|
|
|
@ -1,20 +1,4 @@
|
|||
# 2022-12-30: FYI ansible_date_time.tz provides TZ ABBREVIATIONS (equivalent
|
||||
# to 'date +%Z' output) which leads to serious ambiguity -- and not just (A)
|
||||
# seasonal EST/EDT ambiguities, or (B) floods of geographic synonyms for the
|
||||
# very same time zone! More Seriously: (C) both commands above output "IST"
|
||||
# for both Israel Standard Time (+0200) AND India Standard Time (+0530). Etc!
|
||||
#
|
||||
# While Ansible provides 2 other vars that (slightly) help disambiguate
|
||||
# (ansible_date_time.tz_dst and ansible_date_time.tz_offset), there's a far
|
||||
# better way -- which is to read the System TZ directly from Linux:
|
||||
#
|
||||
# timedatectl show -p "Timezone" --value
|
||||
#
|
||||
# This takes care of essentially everything (e.g. output "America/New_York")
|
||||
# by checking (1) symlink /etc/localtime then (2) text file /etc/timezone
|
||||
# then (3) if neither exist, "UTC" is declated (correctly!) One drawback:
|
||||
# timedatectl if not easily usable within chroot environments.
|
||||
|
||||
# 2022-12-30: Functionality moved to www_options/tasks/php-settings.yml
|
||||
|
||||
- name: "'local_tz: {{ local_tz }}' was set by ansible_date_time.tz in /opt/iiab/iiab/vars/default_vars.yml -- e.g. if Ansible finds symlink /etc/localtime -> ../usr/share/zoneinfo/America/New_York -- it will simplify that to 'EDT' (in the summer) or 'EST' (in the winter)"
|
||||
command: echo
|
Loading…
Add table
Add a link
Reference in a new issue