Skip to content

Commit

Permalink
Set the application timezone during installation
Browse files Browse the repository at this point in the history
Use Madrid as default
  • Loading branch information
Senen committed Nov 15, 2023
1 parent 05423e5 commit a38282a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ server_hostname: "{{ domain | default(ansible_default_ipv4.address) }}"
# Server Timezone
timezone: Europe/Madrid

# Consul Democracy Timezone
application_timezone: Madrid

# General settings
env: production
deploy_user: deploy
Expand Down
6 changes: 6 additions & 0 deletions roles/rails/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@
regexp: '^{{ env }}:\n # secret_key_base: ""'
replace: '{{ env }}:\n secret_key_base: "{{ secret_key_base.stdout }}"'

- name: Update application timezone configuration in secrets.yml
replace:
path: "{{ shared_dir }}/config/secrets.yml"
regexp: '^{{ env }}:\n # time_zone: ""'
replace: '{{ env }}:\n time_zone: "{{ application_timezone }}"'

- name: Do not force https connection
replace:
path: "{{ shared_dir }}/config/secrets.yml"
Expand Down

0 comments on commit a38282a

Please sign in to comment.