Fix handling of missing sections

This commit makes sure that a missing section in an older toml
configuration file does not break the deployment.
This commit is contained in:
Jan Dittberner 2023-08-09 12:10:24 +02:00
parent 10fd052d90
commit 2db1ba3c05
2 changed files with 2 additions and 0 deletions

View file

@ -116,6 +116,7 @@
demoapp_client_secret: "{{ lookup('ansible.builtin.ini', 'client-secret', section='oidc', file='demoapp_config-from-vagrant.toml') | from_json }}"
demoapp_auth_key: "{{ lookup('ansible.builtin.ini', 'auth-key', section='session', file='demoapp_config-from-vagrant.toml') | from_json }}"
demoapp_enc_key: "{{ lookup('ansible.builtin.ini', 'enc-key', section='session', file='demoapp_config-from-vagrant.toml') | from_json }}"
ignore_errors: true
when: demoapp_config_st.stat.exists

View file

@ -101,6 +101,7 @@
idp_csrf_key: "{{ lookup('ansible.builtin.ini', 'csrf.key', section='security', file='idp_config-from-vagrant.toml') | from_json }}"
idp_auth_key: "{{ lookup('ansible.builtin.ini', 'auth-key', section='session', file='idp_config-from-vagrant.toml') | from_json }}"
idp_enc_key: "{{ lookup('ansible.builtin.ini', 'enc-key', section='session', file='idp_config-from-vagrant.toml') | from_json }}"
ignore_errors: true
when: idp_config_st.stat.exists