Skip to content

Commit

Permalink
Fix handling in case no secret key has been defined or it is null in …
Browse files Browse the repository at this point in the history
…the current config
  • Loading branch information
Thulium-Drake committed Sep 7, 2023
1 parent 32eede7 commit da2d609
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions roles/ara_api/tasks/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,11 @@
ara_api_secret_key: "{{ config[ara_api_env]['SECRET_KEY'] }}"
no_log: "{{ ara_api_secure_logging }}"

# If no secret key has been provided and this is the first time we are
# running, generate a new random secret key that will be persisted in the
# If no secret key has been provided or it is not present in the current
# configuration, generate a new random secret key that will be persisted in the
# configuration file.
- when:
- ara_api_secret_key is none
- not settings_stat.stat.exists
block:
- name: Generate a random secret key
command: tr -dc A-Za-z0-9 </dev/urandom | head -c 50 ; echo ''
Expand Down
1 change: 1 addition & 0 deletions roles/ara_api/tasks/install/podman.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
You seem to have ARA-API installed via PyPI in the past, if you like
this role can clean up that installation and migrate your data to the Podman
installation, by setting ara_api_migrate_to_podman to true
when: existing_pypi_install['stat']['exists']

- name: 'Remove PyPI installation and migrate data'
when: ara_api_migrate_to_podman
Expand Down

0 comments on commit da2d609

Please sign in to comment.