|
31 | 31 |
|
32 | 32 | - name: SAP SWPM Pre Install - Define the temporary directory for SWPM |
33 | 33 | ansible.builtin.set_fact: |
34 | | - __sap_swpm_fact_tempdir_from_env: "{{ ansible_env.TEMP | d('/tmp') }}" |
| 34 | + __sap_swpm_fact_tempdir_from_env: "{{ ansible_facts['env'].TEMP | d('/tmp') }}" |
35 | 35 | tags: |
36 | 36 | - sap_swpm_generate_inifile |
37 | 37 | - sap_swpm_sapinst_commandline |
|
171 | 171 | FAIL: The variable '{{ __sap_swpm_var_name }}' is empty. |
172 | 172 | {% endif %} |
173 | 173 | loop: |
174 | | - - sap_swpm_software_path |
175 | 174 | - sap_swpm_product_catalog_id |
176 | 175 | - sap_swpm_sid |
177 | 176 | - sap_swpm_fqdn |
|
332 | 331 | - name: SAP SWPM - Display Software |
333 | 332 | ansible.builtin.debug: |
334 | 333 | msg: | |
335 | | - SAPCAR: {{ sap_swpm_sapcar_path }}: {{ __sap_swpm_fact_sapcar_file_name }} |
336 | | - SWPM: {{ sap_swpm_swpm_path }}: {{ __sap_swpm_fact_swpm_sar_file_name }} |
| 334 | + SAPCAR: {{ __sap_swpm_fact_sapcar_path }}: {{ __sap_swpm_fact_sapcar_file_name }} |
| 335 | + SWPM: {{ __sap_swpm_fact_swpm_path }}: {{ __sap_swpm_fact_swpm_file_name }} |
337 | 336 | {% if not sap_swpm_generic %} |
338 | | - SAPEXEDB: {{ sap_swpm_software_path }}: {{ __sap_swpm_register_sapexedb_files.files | map(attribute='path') | map('basename') | join(', ') | d('') }} |
339 | | - SAPEXE: {{ sap_swpm_software_path }}: {{ __sap_swpm_register_sapexe_files.files | map(attribute='path') | map('basename') | join(', ') | d('') }} |
340 | | - IGS: {{ sap_swpm_software_path }}: {{ __sap_swpm_register_igs_exe_files.files | map(attribute='path') | map('basename') | join(', ') | d('') }} |
341 | | - IGS Helper: {{ sap_swpm_software_path }}: {{ __sap_swpm_register_igs_helper_files.files | map(attribute='path') | map('basename') | join(', ') | d('') }} |
| 337 | + SAPEXEDB: {{ __sap_swpm_fact_software_path }}: {{ __sap_swpm_register_sapexedb_files.files | map(attribute='path') | map('basename') | join(', ') | d('') }} |
| 338 | + SAPEXE: {{ __sap_swpm_fact_software_path }}: {{ __sap_swpm_register_sapexe_files.files | map(attribute='path') | map('basename') | join(', ') | d('') }} |
| 339 | + IGS: {{ __sap_swpm_fact_software_path }}: {{ __sap_swpm_register_igs_exe_files.files | map(attribute='path') | map('basename') | join(', ') | d('') }} |
| 340 | + IGS Helper: {{ __sap_swpm_fact_software_path }}: {{ __sap_swpm_register_igs_helper_files.files | map(attribute='path') | map('basename') | join(', ') | d('') }} |
342 | 341 | {% if 'Webdispatcher' in sap_swpm_product_catalog_id | string %} |
343 | | - WEBDISP: {{ sap_swpm_software_path }}: {{ __sap_swpm_register_sapwebdisp_files.files | map(attribute='path') | map('basename') | join(', ') | d('') }} |
| 342 | + WEBDISP: {{ __sap_swpm_fact_software_path }}: {{ __sap_swpm_register_sapwebdisp_files.files | map(attribute='path') | map('basename') | join(', ') | d('') }} |
344 | 343 | {% endif %} |
345 | 344 | {% endif %} |
346 | | - {% if sap_swpm_swpm_installation_type in ['maint_plan_stack', 'ha_maint_plan_stack'] %} |
| 345 | + {% if __sap_swpm_fact_installation_type in ['maint_plan_stack', 'ha_maint_plan_stack'] %} |
347 | 346 | MP Stack: {{ (sap_swpm_mp_stack_path | d('', true) + '/' + sap_swpm_mp_stack_file_name | d('', true)) | regex_replace('//*', '/') }}" |
348 | 347 | {% endif %} |
349 | 348 | {% if sap_swpm_backup_location is defined and sap_swpm_backup_location | string | trim | length > 0 %} |
|
354 | 353 | - name: SAP SWPM - Installation Process |
355 | 354 | ansible.builtin.debug: |
356 | 355 | msg: |
357 | | - - ' Ready to run SWPM for SAP Software Installation ' |
358 | | - - ' ' |
359 | | - - ' SAP Product - {{ sap_swpm_product_catalog_id }} ' |
360 | | - - ' SID - {{ sap_swpm_sid }} ' |
361 | | - - ' Host - {{ ansible_hostname }} ' |
362 | | - - ' ' |
363 | | - - ' The installation can take up to 3 hours. Run the following command as root' |
364 | | - - ' on {{ ansible_hostname }} to display the installation logs:' |
365 | | - - ' # tail -f $(cat {{ __sap_swpm_fact_tempdir_from_env }}/sapinst_instdir/.lastInstallationLocation)/sapinst.log' |
| 356 | + - " Ready to run SWPM for SAP Software Installation " |
| 357 | + - " " |
| 358 | + - " SAP Product - {{ sap_swpm_product_catalog_id }} " |
| 359 | + - " SID - {{ sap_swpm_sid }} " |
| 360 | + - " Host - {{ ansible_facts['hostname'] }} " |
| 361 | + - " " |
| 362 | + - " The installation can take up to 3 hours. Run the following command as root" |
| 363 | + - " on {{ ansible_facts['hostname'] }} to display the installation logs:" |
| 364 | + - " # tail -f $(cat {{ __sap_swpm_fact_tempdir_from_env }}/sapinst_instdir/.lastInstallationLocation)/sapinst.log" |
366 | 365 |
|
367 | 366 | ################ |
368 | 367 | # Set sapinst command |
369 | 368 | ################ |
370 | 369 |
|
371 | 370 | - name: SAP SWPM Pre Install - Set the sapinst command parameters |
372 | 371 | vars: |
373 | | - sap_swpm_swpm_command_guiserver: "{{ 'SAPINST_START_GUISERVER=false' if not sap_swpm_swpm_observer_mode else '' }}" |
374 | | - sap_swpm_swpm_command_observer: "{{ 'SAPINST_REMOTE_ACCESS_USER=' + sap_swpm_swpm_remote_access_user + ' SAPINST_REMOTE_ACCESS_USER_IS_TRUSTED=true' if sap_swpm_swpm_observer_mode and sap_swpm_swpm_remote_access_user | d('', true) | length > 0 else '' }}" |
| 372 | + sap_swpm_command_guiserver: "{{ 'SAPINST_START_GUISERVER=false' if not __sap_swpm_fact_observer_mode else '' }}" |
| 373 | + sap_swpm_command_observer: "{{ 'SAPINST_REMOTE_ACCESS_USER=' + __sap_swpm_fact_remote_access_user + ' SAPINST_REMOTE_ACCESS_USER_IS_TRUSTED=true' if __sap_swpm_fact_observer_mode and __sap_swpm_fact_remote_access_user | d('', true) | length > 0 else '' }}" |
375 | 374 | ansible.builtin.set_fact: |
376 | | - sap_swpm_swpm_command_inifile: "SAPINST_INPUT_PARAMETERS_URL={{ __sap_swpm_register_tmpdir.path }}/inifile.params" |
377 | | - sap_swpm_swpm_command_product_id: "SAPINST_EXECUTE_PRODUCT_ID={{ sap_swpm_product_catalog_id }}" |
378 | | - # If SWPM is running a normal install Ansible Variable sap_swpm_swpm_command_virtual_hostname is blank |
379 | | - # IF SWPM is running a HA installation, Ansible Variable sap_swpm_swpm_command_virtual_hostname is set and contains "SAPINST_USE_HOSTNAME={{ sap_swpm_virtual_hostname }} IS_HOST_LOCAL_USING_STRING_COMPARE=true" |
380 | | - # If SWPM is running a MP Stack XML installation, Ansible Variable sap_swpm_swpm_command_mp_stack is set and contains "SAPINST_STACK_XML={{ sap_swpm_mp_stack_path }} + '/' (if needed) + {{ sap_swpm_mp_stack_file_name }}" |
381 | | - sap_swpm_swpm_command_extra_args: "SAPINST_SKIP_DIALOGS=true {{ sap_swpm_swpm_command_guiserver }} {{ sap_swpm_swpm_command_observer }} {{ sap_swpm_swpm_command_virtual_hostname | d('') }} {{ sap_swpm_swpm_command_mp_stack | d('') }}" |
| 375 | + __sap_swpm_fact_command_inifile: "SAPINST_INPUT_PARAMETERS_URL={{ __sap_swpm_register_tmpdir.path }}/inifile.params" |
| 376 | + __sap_swpm_fact_command_product_id: "SAPINST_EXECUTE_PRODUCT_ID={{ sap_swpm_product_catalog_id }}" |
| 377 | + # If SWPM is running a normal install Ansible Variable __sap_swpm_fact_command_virtual_hostname is blank |
| 378 | + # IF SWPM is running a HA installation, Ansible Variable __sap_swpm_fact_command_virtual_hostname is set and contains "SAPINST_USE_HOSTNAME={{ sap_swpm_virtual_hostname }} IS_HOST_LOCAL_USING_STRING_COMPARE=true" |
| 379 | + # If SWPM is running a MP Stack XML installation, Ansible Variable __sap_swpm_fact_command_mp_stack is set and contains "SAPINST_STACK_XML={{ sap_swpm_mp_stack_path }} + '/' (if needed) + {{ sap_swpm_mp_stack_file_name }}" |
| 380 | + __sap_swpm_fact_command_extra_args: "SAPINST_SKIP_DIALOGS=true {{ sap_swpm_command_guiserver }} {{ sap_swpm_command_observer }} {{ __sap_swpm_fact_command_virtual_hostname | d('') }} {{ __sap_swpm_fact_command_mp_stack | d('') }} {{ sap_swpm_command_extra_args | d('') }}" |
382 | 381 | tags: sap_swpm_sapinst_commandline |
383 | 382 |
|
384 | 383 | - name: Set fact for the sapinst command line |
385 | 384 | ansible.builtin.set_fact: |
386 | 385 | __sap_swpm_sapinst_command: >- |
387 | | - umask {{ sap_swpm_umask | d('022') }} ; ./sapinst {{ sap_swpm_swpm_command_inifile }} |
388 | | - {{ sap_swpm_swpm_command_product_id }} |
389 | | - {{ sap_swpm_swpm_command_extra_args }} |
| 386 | + umask {{ sap_swpm_umask | d('022') }} ; ./sapinst {{ __sap_swpm_fact_command_inifile }} |
| 387 | + {{ __sap_swpm_fact_command_product_id }} |
| 388 | + {{ __sap_swpm_fact_command_extra_args }} |
390 | 389 | tags: sap_swpm_sapinst_commandline |
391 | 390 |
|
392 | 391 | - name: Display the sapinst command line |
|
0 commit comments