Skip to content

Commit

Permalink
sap_swpm: append when to detect vars
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-freeman committed Nov 8, 2023
1 parent a497413 commit 0a13aa5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions roles/sap_swpm/tasks/swpm/detect_variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
END{print product_id}' {{ sap_swpm_tmpdir.path }}/inifile.params
register: sap_swpm_inifile_product_id_detect
changed_when: false
when: not sap_swpm_product_catalog_id is defined

# Set fact for product id
- name: SAP SWPM - Set SAP product ID
ansible.builtin.set_fact:
sap_swpm_product_catalog_id: "{{ sap_swpm_inifile_product_id_detect.stdout }}"
when: not sap_swpm_product_catalog_id is defined

- name: SAP SWPM - Display SAP product ID
ansible.builtin.debug:
Expand All @@ -25,11 +27,13 @@
awk '!/^#/&&/archives.downloadBasket/{print $3}' {{ sap_swpm_tmpdir.path }}/inifile.params
register: sap_swpm_inifile_software_path
changed_when: false
when: not sap_swpm_software_path is defined

# Set fact for software path
- name: SAP SWPM - Set Software Path
ansible.builtin.set_fact:
sap_swpm_software_path: "{{ sap_swpm_inifile_software_path.stdout }}"
when: not sap_swpm_software_path is defined

- name: SAP SWPM - Display Software Path
ansible.builtin.debug:
Expand All @@ -42,11 +46,13 @@
awk '!/^#/&&/NW_GetSidNoProfiles.sid/{print $3}' {{ sap_swpm_tmpdir.path }}/inifile.params
register: sap_swpm_inifile_sid
changed_when: false
when: not sap_swpm_sid is defined

# Set fact for SID
- name: SAP SWPM - Set SID
ansible.builtin.set_fact:
sap_swpm_sid: "{{ sap_swpm_inifile_sid.stdout }}"
when: not sap_swpm_sid is defined

- name: SAP SWPM - Display SAP SID
ansible.builtin.debug:
Expand All @@ -59,11 +65,13 @@
awk '!/^#/&&/NW_getFQDN.FQDN/{print $3}' {{ sap_swpm_tmpdir.path }}/inifile.params
register: sap_swpm_inifile_fqdn
changed_when: false
when: not sap_swpm_fqdn is defined

# Set fact for FQDN
- name: SAP SWPM - Set FQDN
ansible.builtin.set_fact:
sap_swpm_fqdn: "{{ sap_swpm_inifile_fqdn.stdout }}"
when: not sap_swpm_fqdn is defined

- name: SAP SWPM - Display FQDN
ansible.builtin.debug:
Expand Down

0 comments on commit 0a13aa5

Please sign in to comment.