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 23, 2023
1 parent 59b8bbb commit 7edc726
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ These are the main configuration variables:
# Server Timezone
timezone: Europe/Madrid
# Consul Democracy Timezone
application_timezone: Madrid
# Authorized Hosts
ssh_public_key_path: "~/.ssh/id_rsa.pub"
ansible_ssh_private_key_file: "~/.ssh/id_rsa"
Expand Down
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: '^ # time_zone: ""'
replace: ' time_zone: "{{ application_timezone }}"'

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

0 comments on commit 7edc726

Please sign in to comment.