Skip to content

Commit

Permalink
Merge pull request #920 from berndfinger/issue-909-set-passwords-cond…
Browse files Browse the repository at this point in the history
…itionally

sap_swpm: Use master password only when necessary
  • Loading branch information
berndfinger authored Jan 7, 2025
2 parents bee8bbe + eba6163 commit aa15eed
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions roles/sap_swpm/tasks/pre_install/generate_inifile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,18 @@
sap_swpm_db_schema_password: "{{ sap_swpm_db_schema_java_password }}"
when: "'Java' in sap_swpm_product_catalog_id"

# If the individual passwords are set to a non empty string, use those:
- name: SAP SWPM Pre Install - Set other user passwords using master password
ansible.builtin.set_fact:
sap_swpm_sapadm_password: "{{ sap_swpm_master_password }}"
sap_swpm_sap_sidadm_password: "{{ sap_swpm_master_password }}"
sap_swpm_diagnostics_agent_password: "{{ sap_swpm_master_password }}"
sap_swpm_sapadm_password: "{{ sap_swpm_master_password
if sap_swpm_master_password | d('') and not sap_swpm_sapadm_password | d('')
else sap_swpm_sapadm_password | d('') }}"
sap_swpm_sap_sidadm_password: "{{ sap_swpm_master_password
if sap_swpm_master_password | d('') and not sap_swpm_sap_sidadm_password | d('')
else sap_swpm_sap_sidadm_password | d('') }}"
sap_swpm_diagnostics_agent_password: "{{ sap_swpm_master_password
if sap_swpm_master_password | d('') and not sap_swpm_diagnostics_agent_password | d('')
else sap_swpm_diagnostics_agent_password | d('') }}"

# Generate inifile.params, step 1: Process SWPM Configfile template locally for creating inifile.params
- name: SAP SWPM Pre Install, create inifile - Process SWPM inifile template for creating 'inifile.params'
Expand Down

0 comments on commit aa15eed

Please sign in to comment.