Skip to content

Commit

Permalink
Merge pull request iiab#3931 from holta/tz-hack
Browse files Browse the repository at this point in the history
Restore both GitHub Actions workflows simulating Raspberry Pi
  • Loading branch information
holta authored Feb 1, 2025
2 parents 810c70e + fb787e0 commit 11f65e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion roles/usb_lib/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
- option: name
value: USB_LIB
- option: description
value: '"USB_LIB automounts Teacher Content on USB drives to /library/www/html/local_content, so students can browse it almost immediately at http://box/usb"'
value: '"USB_LIB automounts Teacher Content on USB sticks to /library/www/html/local_content, so students can browse the USB AND upload their work to the USB, all at http://box/usb"'
- option: usb_lib_install
value: "{{ usb_lib_install }}"
- option: usb_lib_enabled
Expand Down
6 changes: 4 additions & 2 deletions roles/www_options/tasks/php-settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@
# 1) Try spawning these "guyot/arm-runner-action@v2" GHA workflows with... use_systemd_nspawn: true
# 2) Weaken timedatectl command just below, trying this instead... shell: readlink /etc/localtime | sed 's#^/usr/share/zoneinfo/##'

- name: Extract Time Zone from symlink /etc/localtime &/or text file /etc/timezone (or lack thereof!)
command: timedatectl show -p Timezone --value
- name: Extract Time Zone from symlink /etc/localtime, text file /etc/timezone, or if all else fails declare Etc/UTC
# command: timedatectl show -p Timezone --value
# 2025-02-01: "guyot/arm-runner-action@v2" GHA workflows don't seem to work with "use_systemd_nspawn: true", so hack in the equivalent of timedatectl...
shell: tmp=$(readlink /etc/localtime) && echo $tmp | sed 's|^/usr/share/zoneinfo/||' || cat /etc/timezone || echo Etc/UTC
register: tz_cli

- name: Store 'date.timezone = {{ tz_cli.stdout }}' (from above) in /etc/php/{{ php_version }}/fpm/php.ini and /etc/php/{{ php_version }}/cli/php.ini
Expand Down

0 comments on commit 11f65e7

Please sign in to comment.