diff --git a/roles/sap_swpm/README.md b/roles/sap_swpm/README.md index f8a16e789..aafa3f751 100644 --- a/roles/sap_swpm/README.md +++ b/roles/sap_swpm/README.md @@ -1,236 +1,861 @@ + # sap_swpm Ansible Role + +![Ansible Lint for sap_swpm](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_swpm.yml/badge.svg) + +## Description + +The Ansible role `sap_swpm` installs various SAP Systems installable by SAP Software Provisioning Manager (SWPM). + + + +## Dependencies +- `fedora.linux_system_roles` + - Roles: + - `selinux` + +Install required collections by `ansible-galaxy install -vv -r meta/collection-requirements.yml`. + + +## Prerequisites + +Managed nodes: +- Directory with SAP Installation media is present and `sap_swpm_software_path` updated. Download can be completed using [community.sap_launchpad](https://github.com/sap-linuxlab/community). +- Ensure that servers are configured for SAP Systems. See [Recommended](#recommended) section. +- Ensure that volumes and filesystems are configured correctly. See [Recommended](#recommended) section. + +### Prepare SAP installation media +Place a valid SAPCAR executable file in a directory specified by variable `sap_swpm_sapcar_path` (e.g. /software/sapcar). Example: `SAPCAR_1300-70007716.EXE` + +Place a valid SWPM SAR file in a directory specified by variable `sap_swpm_swpm_path` (e.g. /software/sap_swpm). Example: `SWPM20SP18_3-80003424.SAR` + +Place the following files in a directory specified by variable `sap_swpm_software_path` (e.g. /software/sap_swpm_download_basket): + - For a new installation + - Download the appropriate software from SAP Software Download Center, Maintenance Planner, etc. + - For a restore or new installation + - SAP IGS - `igs*.sar` + - SAP IGS HELPER - `igshelper*sar` + - SAP Host Agent - `SAPHOSTAGENT*SAR` + - SAP Kernel DB - `SAPEXEDB_*SAR` + - SAP Kernel DB Independent - `SAPEXE_*SAR` + - SAP HANA Client - `IMDB_CLIENT*SAR` + +Alternatively, you can place all the files mentioned above into a single directory and use the role [sap_install_media_detect](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_install_media_detect) to identify the required files and set the role variables automatically so that the role `sap_swpm` has access to all the files needed for a successful installation of SAP System. + -Ansible role for SAP software installation using SWPM +## Execution + + -## Requirements + +### Recommended +It is recommended to execute this role together with other roles in this collection, in the following order:
+1. [sap_general_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_general_preconfigure) +2. [sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure) +3. [sap_install_media_detect](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_install_media_detect) +4. *`sap_swpm`* -The role requires additional collections which are specified in `meta/collection-requirements.yml`. Before using this role, -make sure that the required collections are installed, for example by using the following command: +Note: For most scenarios, a database like SAP HANA must be available. Use the role [sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_install) for installing the SAP HANA database. + -`ansible-galaxy install -vv -r meta/collection-requirements.yml` +### Execution Flow + -## Scope +### Pre-Install -This role has been tested and working for the following scenarios -- One Host Installation -- Dual Host Installation -- Distributed Installation -- System Restore -- High Availability Installation +- Determine installation type + - The product id specified determines the installation type + - standard installation + - system restore + - generic product installation + - high availability installation -This role has been tested and working for the following SAP products -- SAP S/4HANA 1809, 1909, 2020, 2021 -- SAP BW/4HANA -- SAP Solution Manager 7.2 -- SAP Netweaver Business Suite Applications (ECC, GRC, etc) -- SAP Web Dispatcher +- Get SAPCAR executable filename from `sap_swpm_sapcar_path` -> The general rule is - if the installation uses SAP SWPM then this Ansible Role can be used. +- Get SWPM executable filename from `sap_swpm_swpm_path` -### SAP Preconfigure +- Get all .SAR filenames from `sap_swpm_software_path` -- Ensure the required volumes and filesystems are configured in the host. You can use the role `sap_storage_setup` to configure this. More info [here](/roles/sap_storage_setup) +- (Optional) Update `/etc/hosts` if `sap_swpm_update_etchosts` is set to `true` (Default: `false`). -- Please run the RHEL SAP System Role `sap_general_preconfigure` for initial host configuration; as necessary, also use `sap_netweaver_preconfigure` and `sap_hana_preconfigure` +- (Optional) Apply firewall rules for SAP HANA if `sap_swpm_setup_firewall` is set to `true` (Default: `false`). -- For further guidance on using SAP SWPM for different SAP Software installations, please see System Provisioning with Software Provisioning Manager (SWPM) - [User Guides for SAP SWPM 1.0](30839dda13b2485889466316ce5b39e9/c8ed609927fa4e45988200b153ac63d1.html?locale=en-US) and [User Guides for SAP SWPM 2.0](https://help.sap.com/docs/SOFTWARE_PROVISIONING_MANAGER/30839dda13b2485889466316ce5b39e9/6865029dacbe473fadd8eff339bfa568.html?locale=en-US) +- At this stage, the role is searching for a sapinst inifile on the managed node, or it will create one: -### SAP Software Installation .SAR Files + - If a file `inifile.params` is located on the managed node in the directory specified in `sap_swpm_inifile_directory`, + the role will not create a new one but rather download this file to the control node. -1. SAPCAR executable + - If such a file does *not* exist, the role will create an SAP SWPM `inifile.params` file by one of the following methods: -2. Software Provisioning Manager .SAR file - - `SWPM*.SAR` + Method 1: Predefined sections of the file `inifile_params.j2` will be used to create the file `inifile.params`. The variable `sap_swpm_inifile_sections_list` contains a list of sections which will part of the file `inifile.params`. All other sections will be ignored. The inifile parameters themselves will be set according to other role parameters. Example: The inifile parameter `archives.downloadBasket` will be set to the content of the role parameter `sap_swpm_software_path`. -3. SAP Installation files - - For New Installation - - Download appropriate software from SAP Software Download Center, Maintenance Planner, etc - - For Restore or New Installation - - SAP IGS - `igs*.sar` - - SAP IGS HELPER - `igshelper*sar` - - SAP Host Agent - `SAPHOSTAGENT*SAR` - - SAP Kernel DB - `SAPEXEDB_*SAR` - - SAP Kernel DB Independent - `SAPEXE_*SAR` - - SAP HANA Client - `IMDB_CLIENT*SAR` + Method 2: The file `inifile.params` will be configured from the content of the dictionary `sap_swpm_inifile_parameters_dict`. This dictionary is defined like in the following example: -4. SAP HANA Database MDC DB Tenant Backup (for restore) - - stored on the local disk of the machine where the SAP HANA database server will reside +``` +sap_swpm_inifile_parameters_dict: + archives.downloadBasket: /software/download_basket + NW_getFQDN.FQDN: example.com +``` - NOTE: Specific media requirements will use format `SAPINST.CD.PACKAGE. = `, and the media names can be discovered by using this command on the SWPM directory `grep -rwh " -Please check the default parameters file for more information on other parameters that can be used as an input: -- [**sap_swpm** default parameters](defaults/main.yml) +### Example + -Sample Playbooks and sample parameters are shown in the Ansible Collection `/playbooks` directory. +#### Playbook for installing a SAP ABAP ASCS instance in distributed system with [sap_install_media_detect](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_install_media_detect) role +Example shows execution together with [sap_install_media_detect](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_install_media_detect) role, which sets required variables for `sap_swpm` role.
+```yaml +--- +- name: Ansible Play for SAP ABAP ASCS installation in distributed system + hosts: nwas_ascs + become: true + any_errors_fatal: true + max_fail_percentage: 0 + tasks: + + - name: Execute Ansible Role sap_install_media_detect + ansible.builtin.include_role: + name: community.sap_install.sap_install_media_detect + vars: + sap_install_media_detect_swpm: true + sap_install_media_detect_hostagent: true + sap_install_media_detect_igs: true + sap_install_media_detect_kernel: true + sap_install_media_detect_webdisp: false + sap_install_media_detect_source_directory: /software + + - name: Execute Ansible Role sap_swpm + ansible.builtin.include_role: + name: community.sap_install.sap_swpm + vars: + sap_swpm_sid: AE1 + sap_swpm_virtual_hostname: ae1ascs + sap_swpm_ascs_instance_nr: "01" + sap_swpm_master_password: "Password@1" # Do not use, this is example only! + sap_swpm_ddic_000_password: "Password@1" # Do not use, this is example only! + sap_swpm_sapadm_uid: "3000" + sap_swpm_sapsys_gid: "3001" + sap_swpm_sidadm_uid: "3001" + sap_swpm_product_catalog_id: NW_ABAP_ASCS:NW750.HDB.ABAPHA + sap_swpm_inifile_sections_list: + - swpm_installation_media + - swpm_installation_media_swpm1 + - credentials + - credentials_hana + - db_config_hana + - db_connection_nw_hana + - nw_config_other + - nw_config_central_services_abap + - nw_config_primary_application_server_instance + - nw_config_ports + - nw_config_host_agent + - sap_os_linux_user + + sap_swpm_role_parameters_dict: + sap_swpm_install_saphostagent: 'true' +``` -The Ansible Collection `/playbooks` directory includes sample playbooks for using the `sap_swpm` Ansible Role in the following 'modes': -- Default -- Default Templates -- Advanced -- Advanced Templates -- Inifile Reuse + -The Ansible Collection `/playbooks/vars` directory includes sample variable files for: -- `sap_swpm` 'Default mode' to generate inifile.params of... - - SAP BW/4HANA OneHost - - SAP S/4HANA Distributed - ASCS, DBCI, ERS, PAS - - SAP S/4HANA OneHost - - SAP S/4HANA System Copy OneHost - - SAP Solution Manager (ABAP) - - SAP Solution Manager (JAVA) - - SAP Web Dispatcher - - SAP System Rename -- `sap_swpm` 'Default Templates mode' to generate inifile.params of... - - SAP S/4HANA OneHost - - SAP S/4HANA System Copy OneHost - - SAP System Rename -- `sap_swpm` 'Advanced mode' to generate inifile.params of... - - SAP S/4HANA OneHost -- `sap_swpm` 'Advanced Templates mode' to generate inifile.params of... - - SAP BW/4HANA OneHost - - SAP S/4HANA Distributed - ASCS, DBCI, ERS, PAS - - SAP S/4HANA OneHost - - SAP S/4HANA System Copy OneHost - - SAP Solution Manager (ABAP) - - SAP Solution Manager (JAVA) - - SAP Web Dispatcher - - SAP System Rename -- `sap_swpm` 'Inifile Reuse mode' inifile.params file for... - - SAP S/4HANA OneHost - -NOTE: these are only sample files, they are meant to be edited by the user before execution and do not cover all scenarios possible (the Ansible Role can execute ant SAP SWPM installation) + +### Role Tags +With the following tags, the role can be called to perform certain activities only: +- tag `sap_swpm_generate_inifile`: Only create the sapinst inifile, without running most of the preinstall steps. + This can be useful for checking if the inifile is created as desired. +- tag `sap_swpm_sapinst_commandline`: Only show the sapinst command line. +- tag `sap_swpm_pre_install`: Perform all preinstallation steps, then exit. +- tag `sap_swpm_setup_firewall`: Only perform the firewall preinstallation settings (but only if variable `sap_swpm_setup_firewall` is set to `true`). +- tag `sap_swpm_update_etchosts`: Only update file `/etc/hosts` (but only if variable `sap_swpm_update_etchosts` is set to `true`). + -## Execution +## License + +Apache 2.0 + + +## Maintainers + +- [Bernd Finger](https://github.com/berndfinger) +- [Sean Freeman](https://github.com/seanfreeman) + + +## Role Variables + +**NOTE: Discontinued variables:** +- `sap_swpm_ansible_role_mode` -Sample Ansible Playbook Execution +### Variables for creating sapinst inifile -- Local Host Installation - - `ansible-playbook --connection=local --limit localhost -i "localhost," sap-swpm.yml -e "@inputs/S4H.install"` +#### sap_swpm_run_sapinst +- _Type:_ `bool` +- _Default:_ `true` -- Target Host Installation - - `ansible-playbook -i "" sap-swpm.yml -e "@inputs/S4H.install"` +Set to `false` to disable execution of sapinst after creation of inifile. -### Sample Playbook +### Variables for controlling contents of inifile + +#### sap_swpm_inifile_sections_list +- _Type:_ `list` +- _Default:_ ```yaml ---- -- hosts: all - become: true - roles: - - { role: sap_swpm } +sap_swpm_inifile_sections_list: + - swpm_installation_media + - swpm_installation_media_swpm2_hana + - credentials + - credentials_hana + - db_config_hana + - db_connection_nw_hana + - db_restore_hana + - nw_config_other + - nw_config_central_services_abap + - nw_config_primary_application_server_instance + - nw_config_ports + - nw_config_host_agent + - sap_os_linux_user ``` -## Execution Flow +Define list of sections that will be used to control parameters added into sapinst inifile. +Available values: +```yaml +sap_swpm_inifile_sections_list: + - swpm_installation_media + - swpm_installation_media_swpm2_hana + - swpm_installation_media_swpm1 + - swpm_installation_media_swpm1_exportfiles + - swpm_installation_media_swpm1_ibmdb2 + - swpm_installation_media_swpm1_oracledb_121 + - swpm_installation_media_swpm1_oracledb_122 + - swpm_installation_media_swpm1_oracledb_19 + - swpm_installation_media_swpm1_sapase + - swpm_installation_media_swpm1_sapmaxdb + - maintenance_plan_stack_tms_config + - maintenance_plan_stack_tms_transports + - maintenance_plan_stack_spam_config + - maintenance_plan_stack_sum_config + - maintenance_plan_stack_sum_10_batch_mode + - credentials + - credentials_hana + - credentials_anydb_ibmdb2 + - credentials_anydb_oracledb + - credentials_anydb_sapase + - credentials_anydb_sapmaxdb + - credentials_nwas_ssfs + - credentials_hdbuserstore + - db_config_hana + - db_config_anydb_all + - db_config_anydb_ibmdb2 + - db_config_anydb_oracledb + - db_config_anydb_oracledb_121 + - db_config_anydb_oracledb_122 + - db_config_anydb_oracledb_19 + - db_config_anydb_sapase + - db_config_anydb_sapmaxdb + - db_connection_nw_hana + - db_connection_nw_anydb_ibmdb2 + - db_connection_nw_anydb_oracledb + - db_connection_nw_anydb_sapase + - db_restore_hana + - nw_config_anydb + - nw_config_other + - nw_config_central_services_abap + - nw_config_central_services_java + - nw_config_primary_application_server_instance + - nw_config_additional_application_server_instance + - nw_config_ers + - nw_config_ports + - nw_config_java_ume + - nw_config_java_feature_template_ids + - nw_config_java_icm_credentials + - nw_config_webdisp_generic + - nw_config_webdisp_gateway + - nw_config_host_agent + - nw_config_post_load_abap_reports + - nw_config_livecache + - nw_config_sld + - nw_config_abap_language_packages + - sap_os_linux_user +``` -### Pre-Install -- Determine installation type - - The product id specified determines the installation type - - standard installation - - system restore - - generic product installation - - high availability installation +### Variables to define software paths -- Get SAPCAR executable filename from `sap_swpm_sapcar_path` +#### sap_swpm_sapcar_path +- _Type:_ `string` -- Get SWPM executable filename from `sap_swpm_swpm_path` +Define path to directory with SAPCAR file. -- Get all .SAR filenames from `sap_swpm_software_path` +#### sap_swpm_sapcar_file_name +- _Type:_ `string` -- Update `/etc/hosts` (optional - yes by default) +(Optional) Define name of SAPCAR file, or leave for auto-detection. -- Apply firewall rules for SAP HANA (optional - no by default) +#### sap_swpm_swpm_path +- _Type:_ `string` -- Process SAP SWPM `inifile.params` based on inputs +Define path to directory with SWPM. -### SAP SWPM +#### sap_swpm_swpm_sar_file_name +- _Type:_ `string` -- Execute SWPM +(Optional) Define name of SWPM file, or leave for auto-detection. -### Post-Install +#### sap_swpm_software_extract_directory +- _Type:_ `string` -- Set expiry of Unix created users to 'never' +(Optional) Define path to directory with unpacked SWPM file. -- Apply firewall rules for SAP NW (optional - no by default) +#### sap_swpm_software_use_media +- _Type:_ `bool` +- _Default:_ `false` +Set to `true` to use SAP Media files instead of SAR files.
+- SWPM2 (New SAP products like S4H, BW4H) uses SAR files.
+- SWPM1 (Older SAP products) use CD Media files. -## Execution Modes +#### sap_swpm_inifile_directory +- _Type:_ `string` -Every SAP Software installation via SAP Software Provisioning Manager (SWPM) is possible, there are different Ansible Role execution modes available: +Define directory where sapinst inifile will be stored. -- Default (`sap_swpm_templates_product_input: default`), run software install tasks using easy Ansible Variable to generate SWPM Unattended installations - - Default Templates (`sap_swpm_templates_product_input: default_templates`), optional use of templating definitions for repeated installations -- Advanced (`sap_swpm_templates_product_input: advanced`), run software install tasks with Ansible Variables one-to-one matched to SWPM Unattended Inifile parameters to generate bespoke SWPM Unattended installations - - Advanced Templates (`sap_swpm_templates_product_input: advanced_templates`), optional use of templating definitions for repeated installations -- Inifile Reuse (`sap_swpm_templates_product_input: inifile_reuse`), run previously-defined installations with an existing SWPM Unattended inifile.params +#### sap_swpm_install_saphostagent +- _Type:_ `bool` +- _Default:_ `true` -### Default Templates mode variables +Set to `false` to disable installation of SAP Hostagent. **Not recommended** -Example using all inifile list parameters with the Default Templates mode to install SAP ECC EhP8 on IBM Db2: -``` -sap_swpm_ansible_role_mode: default_templates -sap_swpm_templates_product_input: default_templates - -sap_swpm_templates_install_dictionary: - - template_name_ecc_ehp8_ibmdb2: - - sap_swpm_product_catalog_id: NW_ABAP_OneHost:BS2016.ERP608.DB6.PD - sap_swpm_inifile_dictionary: - sap_swpm_sid: - ... - sap_swpm_inifile_list: - - swpm_installation_media - - swpm_installation_media_swpm1 - - swpm_installation_media_swpm1_exportfiles - - swpm_installation_media_swpm1_ibmdb2 - - sum_config - - credentials - - credentials_anydb_ibmdb2 - - db_config_anydb_all - - db_config_anydb_ibmdb2 - - db_connection_nw_anydb_ibmdb2 - - nw_config_anydb - - nw_config_other - - nw_config_central_services_abap - # - nw_config_central_services_java - - nw_config_primary_application_server_instance - - nw_config_ports - - nw_config_host_agent - # - nw_config_post_abap_reports - - sap_os_linux_user -``` +### Variables specific to SAP Netweaver -## Tags +#### sap_swpm_product_catalog_id +- _Type:_ `string` -With the following tags, the role can be called to perform certain activities only: -- tag `sap_swpm_generate_inifile`: Only create the sapinst inifile. This can be useful for checking if the inifile is created as desired. -- tag `sap_swpm_sapinst_commandline`: Only show the sapinst command line. -- tag `sap_swpm_pre_install`: Perform all preinstallation steps, then exit. -- tag `sap_swpm_setup_firewall`: Only perform the firewall preinstallation settings (but only if variable `sap_swpm_setup_firewall` is set to `true`). -- tag `sap_swpm_update_etchosts`: Only update file `/etc/hosts` (but only if variable `sap_swpm_update_etchosts` is set to `true`). +Define SWPM Product catalog ID for installation. Example for SAP ASCS Netweaver: `NW_ABAP_ASCS:NW750.HDB.ABAPHA`. -## License +#### sap_swpm_sid +- _Type:_ `string` + +Define SAP System ID (SID) for installation. + +#### sap_swpm_ascs_instance_nr +- _Type:_ `string` + +Define SAP Netweaver ABAP Central Services (ASCS) instance number. + +#### sap_swpm_ascs_instance_hostname +- _Type:_ `string` + +Define SAP Netweaver ABAP Central Services (ASCS) hostname. + +#### sap_swpm_ers_instance_nr +- _Type:_ `string` + +Define SAP Netweaver Enqueue Replication Server (ERS) instance number. + +#### sap_swpm_ers_instance_hostname +- _Type:_ `string` + +Define SAP Netweaver Enqueue Replication Server (ERS) hostname. + +#### sap_swpm_pas_instance_nr +- _Type:_ `string` + +Define SAP Netweaver Primary Application Server (PAS) instance number. + +#### sap_swpm_pas_instance_hostname +- _Type:_ `string` + +Define SAP Netweaver Primary Application Server (PAS) hostname. + +#### sap_swpm_aas_instance_nr +- _Type:_ `string` + +Define SAP Netweaver Additional Application Server (AAS) instance number. + +#### sap_swpm_aas_instance_hostname +- _Type:_ `string` + +Define SAP Netweaver Additional Application Server (AAS) hostname. + +#### sap_swpm_java_scs_instance_nr +- _Type:_ `string` + +Define SAP Netweaver JAVA Central Services (SCS) instance number. + +#### sap_swpm_java_scs_instance_hostname +- _Type:_ `string` + +Define SAP Netweaver JAVA Central Services (SCS) hostname. + +#### sap_swpm_master_password +- _Type:_ `string` + +Define master password used for all users created during SWPM execution. + +#### sap_swpm_ddic_000_password +- _Type:_ `string` + +Define DDIC user password in client 000 for new install, or existing for restore. + +#### sap_swpm_virtual_hostname +- _Type:_ `string` + +Define virtual hostname when installing High Available instances (e.g. SAP ASCS/ERS cluster). +The role attempts to resolve `sap_swpm_virtual_hostname` on the managed node, using DNS and /etc/hosts, and will fail +if this hostname resolution fails. The role will also fail if the IPv4 address for `sap_swpm_virtual_hostname` is +not part of the IPv4 addresses of the managed node. + +### Variables specific to SAP HANA Database Installation + +#### sap_swpm_db_ip +- _Type:_ `string` + +Define IP Address of database host for /etc/hosts update. + +#### sap_swpm_db_fqdn +- _Type:_ `string` + +Define FQDN of database host for /etc/hosts update. + +#### sap_swpm_db_host +- _Type:_ `string` + +Define hostname of database host for /etc/hosts update. + +#### sap_swpm_db_sid +- _Type:_ `string` + +Define database ID (SID). + +#### sap_swpm_db_instance_nr +- _Type:_ `string` + +Define database instance number. + +#### sap_swpm_db_system_password +- _Type:_ `string` + +Define database SYSTEM user password. + +#### sap_swpm_db_systemdb_password +- _Type:_ `string` + +Define database SYSTEMDB user password. + +#### sap_swpm_db_sidadm_password +- _Type:_ `string` + +Define database sidadm user password. + +#### sap_swpm_db_schema_abap +- _Type:_ `string` + +Define ABAP database schema name based on database type:
+- `SAPHANADB` for SAP HANA +- `ABAP` or `SAPABAP1` on IBM Db2 +- `SAPSR3` on Oracle DB + +#### sap_swpm_db_schema_abap_password +- _Type:_ `string` + +Define ABAP database schema password for new installation or restore from backup. + +#### sap_swpm_db_schema_java +- _Type:_ `string` + +Define JAVA database schema name. + +#### sap_swpm_db_schema_java_password +- _Type:_ `string` + +Define JAVA database schema password for new installation or restore from backup. + +#### sap_swpm_db_schema +- _Type:_ `string` + +#### sap_swpm_db_schema_password: +- _Type:_ `string` + + +### Variables specific to SAP JAVA UME + +#### sap_swpm_ume_client_nr +- _Type:_ `string` +- _Default:_ `000` + +Define client number of JAVA UME. + +#### sap_swpm_ume_type +- _Type:_ `string` + +Define type of JAVA UME. + +#### sap_swpm_ume_instance_nr +- _Type:_ `string` +- _Default:_ `{{ sap_swpm_pas_instance_nr }}` + +Define instance number of JAVA UME. + +#### sap_swpm_ume_j2ee_admin_password +- _Type:_ `string` + +Define admin password for JAVA UME. + +#### sap_swpm_ume_j2ee_guest_password +- _Type:_ `string` + +Define guest password for JAVA UME. + +#### sap_swpm_ume_sapjsf_password +- _Type:_ `string` + +Define sapjsf password for JAVA UME. + +#### sap_swpm_ume_instance_hostname +- _Type:_ `string` + +Define instance hostname of JAVA UME. + + +### Variables specific to SAP HANA Database Restore + +#### sap_swpm_backup_location +- _Type:_ `string` + +Define directory with SAP HANA Backup files. + +#### sap_swpm_backup_prefix +- _Type:_ `string` + +Define prefix of SAP HANA Backup files. + +#### sap_swpm_backup_system_password +- _Type:_ `string` + +Define SAP HANA SYSTEM password from source database. + + +### Variables specific to SAP Web Dispatcher + +#### sap_swpm_wd_instance_nr +- _Type:_ `string` + +Define instance number of SAP Web Dispatcher. + +#### sap_swpm_wd_system_connectivity +- _Type:_ `bool` +- _Default:_ `false` + +Set to `true` to set parameter `configureSystemConnectivity` to true during installation. + +#### sap_swpm_wd_activate_icf +- _Type:_ `bool` +- _Default:_ `false` + +Set to `true` to activate ICF. + +#### sap_swpm_wd_backend_sid +- _Type:_ `string` + +Define backend SID for SAP Web Dispatcher connection. + +#### sap_swpm_wd_backend_ms_http_port +- _Type:_ `string` + +Define backend message server HTTP port for SAP Web Dispatcher connection. + +#### sap_swpm_wd_backend_ms_host +- _Type:_ `string` + +Define backend message server hostname for SAP Web Dispatcher connection. + +#### sap_swpm_wd_backend_rfc_host +- _Type:_ `string` + +Define backend hostname for SAP Web Dispatcher RFC connection. + +#### sap_swpm_wd_backend_rfc_instance_nr +- _Type:_ `string` + +Define backend instance number for SAP Web Dispatcher RFC connection. + +#### sap_swpm_wd_backend_rfc_client_nr +- _Type:_ `string` +- _Default:_ `000` + +Define backend SAP client for SAP Web Dispatcher RFC connection. + +#### sap_swpm_wd_backend_rfc_user +- _Type:_ `string` +- _Default:_ `DDIC` + +Define backend SAP user for SAP Web Dispatcher RFC connection. + +#### sap_swpm_wd_backend_rfc_user_password +- _Type:_ `string` + +Define password for backend SAP user for SAP Web Dispatcher RFC connection. + +#### sap_swpm_wd_backend_scenario_size +- _Type:_ `string` + +Define to set parameter `scenarioSize` during installation. + +#### sap_swpm_wd_virtual_host +- _Type:_ `string` + +Define virtual hostname of SAP Web Dispatcher. + + +### Variables for Linux User + +#### sap_swpm_sapadm_password +- _Type:_ `string` + +Define password for Linux user SAPADM. + +#### sap_swpm_sap_sidadm_password +- _Type:_ `string` + +Define password for Linux user SIDADM. + +#### sap_swpm_sapadm_uid +- _Type:_ `string` + +Define UID of Linux user SAPADM. + +#### sap_swpm_sapsys_gid +- _Type:_ `string` + +Define GID of Linux group SAPSYS. + +#### sap_swpm_sidadm_uid +- _Type:_ `string` + +Define UID of Linux user SIDADM. + + +### Miscellaneous Variables + +#### sap_swpm_ascs_install_gateway +- _Type:_ `string` +- _Default:_ `true` + +Enable to install gateway as part of ASCS installation. + +#### sap_swpm_parallel_jobs_nr +- _Type:_ `string` +- _Default:_ `23` + +Define to limit number of parallel extraction SAP HANA jobs. + +#### sap_swpm_diagnostics_agent_password +- _Type:_ `string` + +Define password for Diagnostic Agent. + +#### sap_swpm_igs_path +- _Type:_ `string` +- _Default:_ `{{ sap_swpm_software_path }}` + +Define individual path for SAP IGS file. `sap_swpm_software_path` is used by default. + +#### sap_swpm_igs_file_name +- _Type:_ `string` + +Define individual name of SAP IGS file. Newest file is auto-detected in `sap_swpm_igs_path`. + +#### sap_swpm_igs_helper_path +- _Type:_ `string` +- _Default:_ `{{ sap_swpm_software_path }}` + +Define individual path for SAP IGS Helper file. `sap_swpm_software_path` is used by default. + +#### sap_swpm_igs_helper_file_name +- _Type:_ `string` + +Define individual name of SAP IGS Helper file. Newest file is auto-detected in `sap_swpm_igs_helper_path`. + +#### sap_swpm_kernel_dependent_path +- _Type:_ `string` +- _Default:_ `{{ sap_swpm_software_path }}` + +Define individual path for Database dependent kernel files. `sap_swpm_software_path` is used by default. + +#### sap_swpm_kernel_dependent_file_name +- _Type:_ `string` + +Define individual name of Database dependent kernel file. Newest file is auto-detected in `sap_swpm_kernel_dependent_path`. + +#### sap_swpm_kernel_independent_path +- _Type:_ `string` +- _Default:_ `{{ sap_swpm_software_path }}` + +Define individual path for Database independent kernel files. `sap_swpm_software_path` is used by default. + +#### sap_swpm_kernel_independent_file_name +- _Type:_ `string` + +Define individual name of Database independent kernel file. Newest file is auto-detected in `sap_swpm_kernel_independent_path`. + +#### sap_swpm_web_dispatcher_path +- _Type:_ `string` +- _Default:_ `{{ sap_swpm_software_path }}` + +Define individual path for SAP Web Dispatcher files. `sap_swpm_software_path` is used by default. + +#### sap_swpm_web_dispatcher_file_name +- _Type:_ `string` + +Define individual name of SAP Web Dispatcher file. Newest file is auto-detected in `sap_swpm_web_dispatcher_path`. + +#### sap_swpm_fqdn +- _Type:_ `string` + +Define FQDN for SAP Installation. + +#### sap_swpm_set_fqdn +- _Type:_ `bool` +- _Default:_ `true` + +Set to `false` to disable enabling of FQDN during SWPM. + +#### sap_swpm_use_password_file +- _Type:_ `string` +- _Default:_ `n` + +Set to `y` to use encrypted password file for SWPM execution.
Location has to be same as parameter file location. + +#### sap_swpm_password_file_path +- _Type:_ `string` + +Define path to encrypted password file, used when `sap_swpm_use_password_file` is set to `y`. + +#### sap_swpm_use_livecache +- _Type:_ `bool` +- _Default:_ `false` + +Enable to use Livecache + +#### sap_swpm_load_type +- _Type:_ `string` +- _Default:_ `SAP` + +Define load type parameter `loadType`. + +#### sap_swpm_generic +- _Type:_ `bool` +- _Default:_ `false` + +Set to `true` to execute `sap_swpm` role in generic auto-detection mode, ignoring steps for individual detection. + +#### sap_swpm_swpm_installation_type +- _Type:_ `string` + +Define installation type method. Available types: `restore`, `ha`, `maint_plan_stack`, `ha_maint_plan_stack`.
+Installation type is auto-detected from `sap_swpm_product_catalog_id`. + +#### sap_swpm_swpm_command_virtual_hostname +- _Type:_ `string` + +Define to override default virtual hostname `sap_swpm_virtual_hostname` sapinst command used for HA installation. + +#### sap_swpm_swpm_command_mp_stack +- _Type:_ `string` + +Define to override default sapinst command parameter for Maintenance Plan stack file. + +#### sap_swpm_setup_firewall +- _Type:_ `bool` +- _Default:_ `false` + +Set to `true` to configure firewall after SWPM execution. + +#### sap_swpm_update_etchosts +- _Type:_ `bool` +- _Default:_ `false` + +Set to `true` to to update `/etc/hosts` file with SAP system details for SWPM execution. + +#### sap_swpm_display_unattended_output +- _Type:_ `bool` +- _Default:_ `false` + +Set to `true` to display what sapinst command is being executed. + + +### Variables for setting owner, group, and permissions for the SAP files in `sap_swpm_software_path` + +#### sap_swpm_set_file_permissions +- _Type:_ `bool` +- _Default:_ `true` + +Set to `false` to not change the owner, group, and permissions of the files in `sap_swpm_software_path`. + +#### sap_swpm_software_directory_mode +- _Type:_ `string` +- _Default:_ `0755` + +Set permissions for all directories in `sap_swpm_software_path`. + +#### sap_swpm_software_directory_owner +- _Type:_ `string` +- _Default:_ `root` + +Set owner for all directories in `sap_swpm_software_path`. + +#### sap_swpm_software_directory_group +- _Type:_ `string` +- _Default:_ `root` + +Set group ownership for all directories in `sap_swpm_software_path`. + +#### sap_swpm_files_sapcar_mode +- _Type:_ `string` +- _Default:_ `0755` + +Set permissions for SAPCAR file in `sap_swpm_sapcar_path`. + +#### sap_swpm_files_sapcar_owner +- _Type:_ `string` +- _Default:_ `root` + +Set owner for SAPCAR file in `sap_swpm_sapcar_path`. + +#### sap_swpm_files_sapcar_group +- _Type:_ `string` +- _Default:_ `root` + +Set group ownership for SAPCAR file in `sap_swpm_sapcar_path`. + +#### sap_swpm_files_non_sapcar_mode +- _Type:_ `string` +- _Default:_ `0644` + +Set permissions for all non-SAPCAR files in `sap_swpm_software_path` and for SWPM*.SAR files in `sap_swpm_swpm_path`. + +#### sap_swpm_files_non_sapcar_owner +- _Type:_ `string` +- _Default:_ `root` -Apache license 2.0 +Set owner for all non-SAPCAR files in `sap_swpm_software_path` and for SWPM*.SAR files in `sap_swpm_swpm_path`. -## Author Information +#### sap_swpm_files_non_sapcar_group +- _Type:_ `string` +- _Default:_ `root` -IBM Lab for SAP Solutions, Red Hat for SAP Community of Practice, Jason Masipiquena, Sean Freeman, Bernd Finger, Markus Koch +Set group ownership for all non-SAPCAR files in `sap_swpm_software_path` and for SWPM*.SAR files in `sap_swpm_swpm_path`. + diff --git a/roles/sap_swpm/defaults/main.yml b/roles/sap_swpm/defaults/main.yml index 5ab134ff8..28913cb74 100644 --- a/roles/sap_swpm/defaults/main.yml +++ b/roles/sap_swpm/defaults/main.yml @@ -5,7 +5,8 @@ # SWPM Ansible Role variables ######################################## -sap_swpm_ansible_role_mode: "default" +# We do not use role modes any more: +# sap_swpm_ansible_role_mode: "default" # default # default_templates # advanced @@ -45,22 +46,21 @@ sap_swpm_files_non_sapcar_group: root ######################################## # SWPM Ansible Role variables -# for Inifile Reuse, Advanced, and Defaults/Advanced Templates Mode +# for creating the sapinst inifile ######################################## +# Have the role run the sapinst command with an existing inifile or after creating the inifile: +sap_swpm_run_sapinst: true + # Inifile Reuse Mode sap_swpm_inifile_reuse_source: sap_swpm_inifile_reuse_destination: -# Advanced Mode -#sap_swpm_inifile_custom_values_dictionary: +#sap_swpm_inifile_parameters_dict: # archives.downloadBasket: /software/download_basket # NW_getFQDN.FQDN: poc.cloud ## add.additional.parameters: '' -# Default/Advanced Templates Mode -#sap_swpm_templates_product_input: "" - ######################################## # SWPM Ansible Role variables @@ -68,7 +68,7 @@ sap_swpm_inifile_reuse_destination: # - List of inifile parameters to generate ######################################## -sap_swpm_inifile_list: +sap_swpm_inifile_sections_list: - swpm_installation_media - swpm_installation_media_swpm2_hana # - swpm_installation_media_swpm1 @@ -139,7 +139,8 @@ sap_swpm_inifile_list: ######################################## # SAP product that will be installed and passed as argument to the sapinst installer, example 'NW_ABAP_OneHost:S4HANA2020.CORE.HDB.ABAP' -sap_swpm_product_catalog_id: +# Needs to be defined in the playbook or inventory or can be determined from an existing inifile.params file. +#sap_swpm_product_catalog_id: # SAPCAR path and file name, only path is mandatory. The script will automatically get file_name sap_swpm_sapcar_path: @@ -153,10 +154,10 @@ sap_swpm_software_extract_directory: # e.g. /software/sap_swpm_extracted # Note: # When using SWPM2 (for modern SAP products such as S/4 B/4), using .SAR files is recommended - param value should be false # When using SWPM1 (for older SAP products), using CD Media is the only choice - param value should be true -sap_swpm_software_use_media: 'false' +sap_swpm_software_use_media: false # Main path that this role will look for .SAR files -sap_swpm_software_path: +#sap_swpm_software_path: /software/sapfiles ## This directory path should include these files: ## - igs*sar ## - igshelper*sar @@ -165,6 +166,10 @@ sap_swpm_software_path: ## - IMDB_CLIENT*SAR ## - SAPHOSTAGENT*SAR +# Directory in which a sapinst inifile which is to be used by the role can be stored: +sap_swpm_inifile_directory: '/software/sap_swpm/inifiles' +#sap_swpm_local_inifile_directory: '/tmp/inifiles' + # SWPM1 - paths that this role will look for CD Media software sap_swpm_cd_export_pt1_path: sap_swpm_cd_export_pt2_path: @@ -185,12 +190,12 @@ sap_swpm_ibmdb2_unpack_path: "/db2/db2{{ sap_swpm_db_sid | lower }}/db2_software sap_swpm_mp_stack_path: sap_swpm_mp_stack_file_name: # SUM -sap_swpm_sum_prepare: 'false' -sap_swpm_sum_start: 'false' +sap_swpm_sum_prepare: false +sap_swpm_sum_start: false sap_swpm_sum_batch_file: -sap_swpm_spam_update: 'false' +sap_swpm_spam_update: false sap_swpm_spam_update_sar: -sap_swpm_configure_tms: 'true' +sap_swpm_configure_tms: true sap_swpm_tmsadm_password: sap_swpm_tms_tr_files_path: # --- Experimental --- # @@ -205,7 +210,7 @@ sap_swpm_swpm_observer_mode: false sap_swpm_swpm_remote_access_user: # --- Experimental - SWPM Observer mode --- # -sap_swpm_install_saphostagent: 'true' +sap_swpm_install_saphostagent: true ######################################## @@ -236,7 +241,7 @@ sap_swpm_ddic_000_password: # initial = not an HA setup # set this in the input file when installing ascs, ers to indicate an HA setup -sap_swpm_virtual_hostname: "initial" +sap_swpm_virtual_hostname: ######################################## @@ -352,7 +357,7 @@ sap_swpm_backup_prefix: sap_swpm_backup_system_password: # ASCS Install Gateway -sap_swpm_ascs_install_gateway: "true" +sap_swpm_ascs_install_gateway: true ######################################## @@ -363,8 +368,8 @@ sap_swpm_ascs_install_gateway: "true" sap_swpm_wd_instance_nr: -sap_swpm_wd_system_connectivity: 'false' -sap_swpm_wd_activate_icf: 'false' +sap_swpm_wd_system_connectivity: false +sap_swpm_wd_activate_icf: false sap_swpm_wd_backend_sid: sap_swpm_wd_backend_ms_http_port: sap_swpm_wd_backend_ms_host: @@ -417,18 +422,18 @@ sap_swpm_kernel_independent_file_name: sap_swpm_web_dispatcher_path: sap_swpm_web_dispatcher_file_name: sap_swpm_fqdn: -sap_swpm_set_fqdn: "true" +sap_swpm_set_fqdn: true # If the template to use already has the passwords and they are encrypted the password file must be in the same path as the parameter file -sap_swpm_use_password_file: "n" +sap_swpm_use_password_file: false sap_swpm_password_file_path: -sap_swpm_use_livecache: "false" +sap_swpm_use_livecache: false sap_swpm_ddic_001_password: sap_swpm_load_type: 'SAP' -sap_swpm_generic: 'false' +sap_swpm_generic: false # SWPM sap_swpm_swpm_installation_type: "" @@ -437,10 +442,10 @@ sap_swpm_swpm_command_virtual_hostname: "" sap_swpm_swpm_command_mp_stack: "" # Firewall setup -sap_swpm_setup_firewall: 'false' +sap_swpm_setup_firewall: false # Update /etc/hosts -sap_swpm_update_etchosts: 'false' +sap_swpm_update_etchosts: false # Display SAP SWPM Unattended Mode output (sapinst stdout) sap_swpm_display_unattended_output: false diff --git a/roles/sap_swpm/requirements.yml b/roles/sap_swpm/requirements.yml deleted file mode 100644 index 57520f357..000000000 --- a/roles/sap_swpm/requirements.yml +++ /dev/null @@ -1,6 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 ---- -collections: - - name: https://github.com/ansible-collections/community.general - type: git - version: main diff --git a/roles/sap_swpm/tasks/main.yml b/roles/sap_swpm/tasks/main.yml index aa784ef91..a35c3967d 100644 --- a/roles/sap_swpm/tasks/main.yml +++ b/roles/sap_swpm/tasks/main.yml @@ -9,8 +9,10 @@ - name: SAP SWPM - run swpm ansible.builtin.import_tasks: swpm.yml + when: sap_swpm_run_sapinst tags: - sap_swpm_install - name: SAP SWPM - run postinstall task ansible.builtin.import_tasks: post_install.yml + when: sap_swpm_run_sapinst diff --git a/roles/sap_swpm/tasks/post_install.yml b/roles/sap_swpm/tasks/post_install.yml index 935ed0571..65fba3cf0 100644 --- a/roles/sap_swpm/tasks/post_install.yml +++ b/roles/sap_swpm/tasks/post_install.yml @@ -17,7 +17,7 @@ - name: SAP SWPM Post Install - Firewall Setup ansible.builtin.include_tasks: post_install/firewall.yml when: - - "sap_swpm_setup_firewall | bool" + - sap_swpm_setup_firewall ######################################################################################################################## diff --git a/roles/sap_swpm/tasks/pre_install.yml b/roles/sap_swpm/tasks/pre_install.yml index 9907a412a..9d406993f 100644 --- a/roles/sap_swpm/tasks/pre_install.yml +++ b/roles/sap_swpm/tasks/pre_install.yml @@ -1,45 +1,165 @@ # SPDX-License-Identifier: Apache-2.0 --- +- name: SAP SWPM Pre Install - Define 'sap_swpm_inifile_sections_list' from 'sap_swpm_inifile_list' if necessary + ansible.builtin.set_fact: + sap_swpm_inifile_sections_list: "{{ sap_swpm_inifile_list }}" + when: + - sap_swpm_inifile_sections_list is undefined + - sap_swpm_inifile_list is defined + tags: always + +- name: SAP SWPM Pre Install - Define 'sap_swpm_inifile_parameters_dict' from 'sap_swpm_inifile_custom_values_dictionary' if necessary + ansible.builtin.set_fact: + sap_swpm_inifile_parameters_dict: "{{ sap_swpm_inifile_custom_values_dictionary }}" + when: + - sap_swpm_inifile_parameters_dict is undefined + - sap_swpm_inifile_custom_values_dictionary is defined + tags: always + +# Note: Variable definitions in sap_swpm_templates_install_dictionary will overwrite existing top level definitions. +- name: SAP SWPM Pre Install - Define variables from 'sap_swpm_templates_install_dictionary' if present + when: sap_swpm_templates_install_dictionary is defined + tags: always + block: + + - name: SAP SWPM Pre Install - Display 'sap_swpm_templates_product_input' + ansible.builtin.debug: + msg: + - "sap_swpm_templates_product_input: >{{ sap_swpm_templates_product_input }}<" + ignore_errors: true + + - name: SAP SWPM Pre Install - Fail if 'sap_swpm_inifile_sections_list' and 'sap_swpm_inifile_list' are both defined in the dict + ansible.builtin.fail: + msg: + - "FAIL: In 'sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]', both" + - "'sap_swpm_inifile_sections_list' and 'sap_swpm_inifile_list' are defined!" + - "Only one of these variables may be defined in 'sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]'." + when: + - sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_sections_list'] is defined + - sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_list'] is defined + + - name: SAP SWPM Pre Install - Fail if 'sap_swpm_inifile_parameters_dict' and 'sap_swpm_inifile_custom_values_dictionary' are both defined in the dict + ansible.builtin.fail: + msg: + - "FAIL: In 'sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]', both" + - "'sap_swpm_inifile_parameters_dict', and 'sap_swpm_inifile_custom_values_dictionary', are defined!" + - "Only one of these variables may be defined in 'sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]'." + when: + - sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_parameters_dict'] is defined + - sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_custom_values_dictionary'] is defined + +# Unconditionally define sap_swpm_product_catalog_id from low level member. + - name: SAP SWPM Pre Install - Define 'sap_swpm_product_catalog_id' from low level member with the same name + ansible.builtin.set_fact: +# sap_swpm_product_catalog_id: "{{ sap_swpm_product_catalog_id | +# d(sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_product_catalog_id']) }}" + sap_swpm_product_catalog_id: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_product_catalog_id'] }}" + when: sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_product_catalog_id'] is defined + + - name: SAP SWPM Pre Install - Display 'sap_swpm_product_catalog_id' + ansible.builtin.debug: + msg: "sap_swpm_product_catalog_id: >{{ sap_swpm_product_catalog_id }}<" + +# Unconditionally define sap_swpm_inifile_sections_list from low level member. + - name: SAP SWPM Pre Install - Define 'sap_swpm_inifile_sections_list' from low level member + ansible.builtin.set_fact: + sap_swpm_inifile_sections_list: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_list'] | + d(sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_sections_list']) }}" + when: sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_list'] is defined or + sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_sections_list'] is defined + +# Define sap_swpm_role_parameters_dict from low level member. + - name: SAP SWPM Pre Install - Define 'sap_swpm_role_parameters_dict' from low level member + ansible.builtin.set_fact: + sap_swpm_role_parameters_dict: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_dictionary'] | + d(sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_role_parameters_dict']) }}" + when: sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_dictionary'] is defined or + sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_role_parameters_dict'] is defined + + - name: SAP SWPM Pre Install - Display 'sap_swpm_role_parameters_dict' + ansible.builtin.debug: + msg: "sap_swpm_role_parameters_dict: >{{ sap_swpm_role_parameters_dict }}<" + when: sap_swpm_role_parameters_dict is defined and sap_swpm_role_parameters_dict + ignore_errors: true + +# Define role variables from low level member, looping over 'sap_swpm_role_parameters_dict'. +# Reason for noqa: We are setting variables from the content of a dict, and the variable names are in the dict keys. + - name: SAP SWPM Pre Install - Define role variables from low level member, looping over 'sap_swpm_role_parameters_dict' # noqa var-naming[no-jinja] + ansible.builtin.set_fact: + "{{ line_item.key }}": "{{ line_item.value }}" + loop: "{{ sap_swpm_role_parameters_dict | dict2items if sap_swpm_role_parameters_dict is mapping else [] }}" + loop_control: + loop_var: line_item + when: + - sap_swpm_role_parameters_dict is defined and sap_swpm_role_parameters_dict + + - name: SAP SWPM Pre Install - Display all vars and values of 'sap_swpm_role_parameters_dict' + ansible.builtin.debug: + msg: "{{ line_item.key }}: >{{ lookup('vars', line_item.key) }}<" + loop: "{{ sap_swpm_role_parameters_dict | dict2items if sap_swpm_role_parameters_dict is mapping else [] }}" + loop_control: + loop_var: line_item + when: sap_swpm_role_parameters_dict is defined and sap_swpm_role_parameters_dict + ignore_errors: true + +# Define sap_swpm_inifile_parameters_dict from low level member, or use top level variable if defined. Low level definition has precedence. + - name: SAP SWPM Pre Install - Define 'sap_swpm_inifile_parameters_dict' from low level member + ansible.builtin.set_fact: + sap_swpm_inifile_parameters_dict: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_custom_values_dictionary'] | + d(sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_parameters_dict']) }}" + when: sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_custom_values_dictionary'] is defined or + sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_parameters_dict'] is defined + +# The following task ensures that the two main inifile creation parameters are defined. +# This is necessary when creating the file 'inifile.params'. +- name: SAP SWPM Pre Install - Define the main inifile creation parameters as empty if necessary + ansible.builtin.set_fact: + sap_swpm_inifile_sections_list: "{{ sap_swpm_inifile_sections_list | d([]) }}" + sap_swpm_inifile_parameters_dict: "{{ sap_swpm_inifile_parameters_dict | d({}) }}" + tags: always + +# Assert correct hostname and IP resolution of virtual hostname and IP if: +# - sapinst is requested to be run, and +# - /etc/hosts file is requested to be updated, and +# - sap_swpm_virtual_hostname has been defined + +- name: SAP SWPM Pre Install - Assert hostname resolution for HA + ansible.builtin.include_tasks: + file: pre_install/assert_hostname_resolution_for_ha.yml + apply: + tags: sap_swpm_update_etchosts + when: + - sap_swpm_run_sapinst + - sap_swpm_update_etchosts + - sap_swpm_virtual_hostname | type_debug != 'NoneType' + - sap_swpm_virtual_hostname | length > 0 + tags: sap_swpm_update_etchosts + ################ # Run Preinstallation Steps Based on Run Mode ################ - name: SAP SWPM Pre Install - Run Preinstallation Steps - ansible.builtin.include_tasks: swpm/swpm_pre_install.yml + ansible.builtin.include_tasks: pre_install/swpm_prepare.yml tags: - sap_swpm_generate_inifile - sap_swpm_sapinst_commandline -################ -# Set sapinst command -################ - -- name: SAP SWPM Pre Install - Set sapinst command - vars: - sap_swpm_swpm_command_guiserver: "{{ 'SAPINST_START_GUISERVER=false' if not sap_swpm_swpm_observer_mode else '' }}" - 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 '' }}" - ansible.builtin.set_fact: - sap_swpm_swpm_command_inifile: "SAPINST_INPUT_PARAMETERS_URL={{ sap_swpm_tmpdir.path }}/inifile.params" - sap_swpm_swpm_command_product_id: "SAPINST_EXECUTE_PRODUCT_ID={{ sap_swpm_product_catalog_id }}" - # If SWPM is running a normal install Ansible Variable sap_swpm_swpm_command_virtual_hostname is blank - # 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" - # 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 }}" - 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 }} {{ sap_swpm_swpm_command_mp_stack }}" - tags: sap_swpm_sapinst_commandline - ################ # Pre Install Optional Tasks ################ # Firewall -- name: SAP SWPM Pre Install - Firewall Setup +- name: SAP SWPM Pre Install - Setup Firewall ansible.builtin.include_tasks: file: pre_install/firewall.yml apply: tags: sap_swpm_setup_firewall - when: "sap_swpm_setup_firewall | bool" + when: + - sap_swpm_run_sapinst + - sap_swpm_setup_firewall tags: sap_swpm_setup_firewall # /etc/hosts @@ -49,7 +169,9 @@ file: pre_install/update_etchosts.yml apply: tags: sap_swpm_update_etchosts - when: "sap_swpm_update_etchosts | bool" + when: + - sap_swpm_run_sapinst + - sap_swpm_update_etchosts tags: sap_swpm_update_etchosts ################ @@ -81,3 +203,32 @@ - ' The installation can take up to 3 hours. Run the following command as root' - ' on {{ ansible_hostname }} to display the installation logs:' - ' # tail -f $(cat /tmp/sapinst_instdir/.lastInstallationLocation)/sapinst.log' + +################ +# Set sapinst command +################ + +- name: SAP SWPM Pre Install - Set the sapinst command parameters + vars: + sap_swpm_swpm_command_guiserver: "{{ 'SAPINST_START_GUISERVER=false' if not sap_swpm_swpm_observer_mode else '' }}" + 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 '' }}" + ansible.builtin.set_fact: + sap_swpm_swpm_command_inifile: "SAPINST_INPUT_PARAMETERS_URL={{ sap_swpm_tmpdir.path }}/inifile.params" + sap_swpm_swpm_command_product_id: "SAPINST_EXECUTE_PRODUCT_ID={{ sap_swpm_product_catalog_id }}" + # If SWPM is running a normal install Ansible Variable sap_swpm_swpm_command_virtual_hostname is blank + # 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" + # 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 }}" + 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 }} {{ sap_swpm_swpm_command_mp_stack }}" + tags: sap_swpm_sapinst_commandline + +- name: Set fact for the sapinst command line + ansible.builtin.set_fact: + __sap_swpm_sapinst_command: "umask {{ sap_swpm_umask | d('022') }} ; ./sapinst {{ sap_swpm_swpm_command_inifile }} + {{ sap_swpm_swpm_command_product_id }} + {{ sap_swpm_swpm_command_extra_args }}" + tags: sap_swpm_sapinst_commandline + +- name: Display the sapinst command line + ansible.builtin.debug: + msg: "SAP SWPM install command: '{{ __sap_swpm_sapinst_command }}'" + tags: sap_swpm_sapinst_commandline diff --git a/roles/sap_swpm/tasks/pre_install/assert_hostname_resolution_for_ha.yml b/roles/sap_swpm/tasks/pre_install/assert_hostname_resolution_for_ha.yml new file mode 100644 index 000000000..97b7c594a --- /dev/null +++ b/roles/sap_swpm/tasks/pre_install/assert_hostname_resolution_for_ha.yml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: Apache-2.0 +--- + +# Assert HA settings + +- name: SAP SWPM Pre Install - HA settings - Ensure the dig command is present + ansible.builtin.package: + name: bind-utils + state: present + +- name: SAP SWPM Pre Install - HA settings - Try to resolve sap_swpm_virtual_hostname from DNS + ansible.builtin.command: dig +short +tries=1 +time=1 "{{ sap_swpm_virtual_hostname }}" + register: __sap_swpm_register_virtual_ip_dns + changed_when: false + failed_when: false + +- name: SAP SWPM Pre Install - HA settings - Assign sap_swpm_virtual_ip from DNS + ansible.builtin.set_fact: + __sap_swpm_fact_virtual_ip: "{{ __sap_swpm_register_virtual_ip_dns.stdout_lines[-1] }}" + when: __sap_swpm_register_virtual_ip_dns.stdout_lines | length > 0 + +- name: SAP SWPM Pre Install - HA settings - Try using /etc/hosts for name resolution + when: __sap_swpm_register_virtual_ip_dns.stdout_lines | length == 0 + block: + +# We assign the IP address only if there is exactly one line containing ipv4 and hostname: + - name: SAP SWPM Pre Install - HA settings - Try to resolve sap_swpm_virtual_hostname from /etc/hosts + ansible.builtin.shell: | + awk 'BEGIN{a=0}/^[^#]/&&(/\s{{ sap_swpm_virtual_hostname }}\./||/\s{{ sap_swpm_virtual_hostname }}/){a++; ipaddr=$1}END{if(a==1){print ipaddr}}' /etc/hosts + register: __sap_swpm_register_virtual_ip_etc_hosts + changed_when: false + failed_when: false + + - name: SAP SWPM Pre Install - HA settings - Assign sap_swpm_virtual_ip from /etc/hosts + ansible.builtin.set_fact: + __sap_swpm_fact_virtual_ip: "{{ __sap_swpm_register_virtual_ip_etc_hosts.stdout_lines[-1] }}" + when: __sap_swpm_register_virtual_ip_etc_hosts.stdout_lines | length > 0 + +- name: SAP SWPM Pre Install - HA settings - Assert that sap_swpm_virtual_hostname can be resolved + ansible.builtin.assert: + that: __sap_swpm_fact_virtual_ip is defined and __sap_swpm_fact_virtual_ip | length > 0 + fail_msg: "FAIL: 'sap_swpm_virtual_hostname' is not defined, cannot be resolved, or has multiple entries in /etc/hosts!" + success_msg: "PASS: {{ sap_swpm_virtual_hostname }} can be resolved." + +- name: SAP SWPM Pre Install - HA settings - Assert that sap_swpm_fact_virtual_ip is part of ansible_all_ipv4_addresses + ansible.builtin.assert: + that: __sap_swpm_fact_virtual_ip in ansible_all_ipv4_addresses + fail_msg: "FAIL: {{ __sap_swpm_fact_virtual_ip }} is not part of ansible_all_ipv4_addresses!" + success_msg: "PASS: {{ __sap_swpm_fact_virtual_ip }} is part of ansible_all_ipv4_addresses." diff --git a/roles/sap_swpm/tasks/pre_install/detect_variables_from_inifile.yml b/roles/sap_swpm/tasks/pre_install/detect_variables_from_inifile.yml new file mode 100644 index 000000000..541378960 --- /dev/null +++ b/roles/sap_swpm/tasks/pre_install/detect_variables_from_inifile.yml @@ -0,0 +1,80 @@ +# SPDX-License-Identifier: Apache-2.0 +--- + +# Detect and set Product ID +- name: SAP SWPM Pre Install - Detect Product ID from inifile + ansible.builtin.command: | + awk 'BEGIN{IGNORECASE=1;a=0} + /Product ID/&&a==0{a=1; gsub ("#", ""); gsub ("\047", ""); product_id=$NF} + END{print product_id}' {{ sap_swpm_tmpdir_local.path }}/inifile.params + delegate_to: localhost + register: sap_swpm_inifile_product_id_detect + changed_when: false + +- name: SAP SWPM Pre Install - Report if 'sap_swpm_product_catalog_id' has been defined differently + ansible.builtin.debug: + msg: "NOTE: The Product ID in '{{ sap_swpm_tmpdir_local.path }}/inifile.params' is different from the role parameter 'sap_swpm_inifile_product_id_detect'." + when: + - sap_swpm_product_catalog_id + - sap_swpm_inifile_product_id_detect.stdout != sap_swpm_product_catalog_id + +- name: SAP SWPM Pre Install - Set SAP product ID + ansible.builtin.set_fact: + sap_swpm_product_catalog_id: "{{ sap_swpm_inifile_product_id_detect.stdout }}" + +# Detect and set Software Path +- name: SAP SWPM Pre Install - Detect Software Path from inifile + ansible.builtin.command: | + awk '!/^#/&&/archives.downloadBasket/{print $3}' {{ sap_swpm_tmpdir_local.path }}/inifile.params + delegate_to: localhost + register: sap_swpm_inifile_software_path_detect + changed_when: false + +- name: SAP SWPM Pre Install - Report if 'sap_swpm_software_path' has been defined differently + ansible.builtin.debug: + msg: "NOTE: The Software Path in '{{ sap_swpm_tmpdir_local.path }}/inifile.params' is different from the role parameter 'sap_swpm_software_path'." + when: + - sap_swpm_software_path + - sap_swpm_inifile_software_path_detect.stdout != sap_swpm_software_path + +- name: SAP SWPM Pre Install - Set Software Path + ansible.builtin.set_fact: + sap_swpm_software_path: "{{ sap_swpm_inifile_software_path_detect.stdout }}" + +# Detect and set SID +- name: SAP SWPM Pre Install - Detect SID from inifile + ansible.builtin.command: | + awk '!/^#/&&/NW_GetSidNoProfiles.sid/{print $3}' {{ sap_swpm_tmpdir_local.path }}/inifile.params + delegate_to: localhost + register: sap_swpm_inifile_sid_detect + changed_when: false + +- name: SAP SWPM Pre Install - Report if 'sap_swpm_sid' has been defined differently + ansible.builtin.debug: + msg: "NOTE: The SID in '{{ sap_swpm_tmpdir_local.path }}/inifile.params' is different from the role parameter 'sap_swpm_sid'." + when: + - sap_swpm_sid + - sap_swpm_inifile_sid_detect.stdout != sap_swpm_sid + +- name: SAP SWPM Pre Install - Set SID + ansible.builtin.set_fact: + sap_swpm_sid: "{{ sap_swpm_inifile_sid_detect.stdout }}" + +# Detect and set FQDN +- name: SAP SWPM Pre Install - Detect FQDN from inifile + ansible.builtin.command: | + awk '!/^#/&&/NW_getFQDN.FQDN/{print $3}' {{ sap_swpm_tmpdir_local.path }}/inifile.params + delegate_to: localhost + register: sap_swpm_inifile_fqdn_detect + changed_when: false + +- name: SAP SWPM Pre Install - Report if 'sap_swpm_fqdn' has been defined differently + ansible.builtin.debug: + msg: "NOTE: The FQDN in '{{ sap_swpm_tmpdir_local.path }}/inifile.params' is different from the role parameter 'sap_swpm_fqdn'." + when: + - sap_swpm_fqdn + - sap_swpm_inifile_sid_detect.stdout != sap_swpm_fqdn + +- name: SAP SWPM Pre Install - Set FQDN + ansible.builtin.set_fact: + sap_swpm_fqdn: "{{ sap_swpm_inifile_fqdn_detect.stdout }}" diff --git a/roles/sap_swpm/tasks/pre_install/firewall.yml b/roles/sap_swpm/tasks/pre_install/firewall.yml index f27aea554..a36cb1644 100644 --- a/roles/sap_swpm/tasks/pre_install/firewall.yml +++ b/roles/sap_swpm/tasks/pre_install/firewall.yml @@ -54,7 +54,7 @@ - "51000" - "64997" when: - - not sap_swpm_generic | bool + - not sap_swpm_generic - name: SAP SWPM Pre Install - Add Ports Based on NR - {{ sap_swpm_db_instance_nr }} ansible.builtin.include_tasks: update_firewall.yml @@ -62,7 +62,7 @@ loop_control: loop_var: passed_port when: - - not sap_swpm_generic | bool + - not sap_swpm_generic # Reason for noqa: We currently do not determine if reloading the firewall changes anything - name: SAP SWPM Pre Install - Reload Firewall # noqa no-changed-when diff --git a/roles/sap_swpm/tasks/pre_install/generate_inifile.yml b/roles/sap_swpm/tasks/pre_install/generate_inifile.yml new file mode 100644 index 000000000..53f4809ff --- /dev/null +++ b/roles/sap_swpm/tasks/pre_install/generate_inifile.yml @@ -0,0 +1,193 @@ +# SPDX-License-Identifier: Apache-2.0 +--- + +# The following task is used for checking if an inifile exists on the managed node +- name: SAP SWPM Pre Install - Ensure the sapinst inifile directory '{{ sap_swpm_inifile_directory }}' exists on the managed node + ansible.builtin.file: + path: "{{ sap_swpm_inifile_directory }}" + state: directory + owner: 'root' + group: 'root' + mode: '0755' + +- name: SAP SWPM Pre Install - Check if file '{{ sap_swpm_inifile_directory }}/inifile.params' exists on the managed node + ansible.builtin.stat: + path: "{{ sap_swpm_inifile_directory }}/inifile.params" + check_mode: no + register: __sap_swpm_register_stat_sapinst_inifile + +- name: SAP SWPM Pre Install - Try using existing SWPM inifile 'inifile.params' + when: __sap_swpm_register_stat_sapinst_inifile.stat.exists + block: + + - name: SAP SWPM Pre Install, existing inifile - Notify about existing sapinst inifile on the managed node + ansible.builtin.debug: + msg: "INFO: Using existing sapinst inifile '{{ sap_swpm_inifile_directory }}/inifile.params'." + +# Note: Attempting to fetch and store into sap_swpm_tmpdir_local.path results in a 'Permission denied' error. +# So we are using 'slurp' and 'copy' for this purpose. + - name: SAP SWPM Pre Install, existing inifile - Slurp the remote 'inifile.params' for copying to control node + ansible.builtin.slurp: + src: "{{ sap_swpm_inifile_directory }}/inifile.params" + register: sap_swpm_slurped_remote_inifile + + - name: SAP SWPM Pre Install, existing inifile - Copy 'inifile.params' to the control node + ansible.builtin.copy: + content: "{{ sap_swpm_slurped_remote_inifile['content'] | b64decode }}" + dest: "{{ sap_swpm_tmpdir_local.path }}/inifile.params" + owner: 'root' + group: 'root' + mode: '0640' + delegate_to: localhost + +# Now we need to confirm that des25 is not in the inifile + - name: SAP SWPM Pre Install, existing inifile - Search inifile for for des25 + ansible.builtin.shell: | + set -o pipefail && awk 'BEGIN{a=0}!/^#/&&/des25\(/{a++}END{print a}' {{ sap_swpm_tmpdir_local.path }}/inifile.params + delegate_to: localhost + register: sap_swpm_inifile_count_des25 + changed_when: false + + - name: SAP SWPM Pre Install, existing inifile - Ensure that des25 is not present in inifile + ansible.builtin.fail: + msg: + - "Inifile '{{ sap_swpm_inifile_directory }}/inifile.params' cannot be reused because it contains des25 encrypted data." + - "See also SAP notes 2609804." + when: sap_swpm_inifile_count_des25.stdout != '0' + + - name: SAP SWPM Pre Install - Detect Variables + ansible.builtin.import_tasks: + file: detect_variables_from_inifile.yml + +# At this point, the following variables need to be set: +# sap_swpm_product_catalog_id, sap_swpm_software_path, sap_swpm_sid, sap_swpm_fqdn +- name: SAP SWPM Pre Install - Assert that certain variables are set + ansible.builtin.assert: + that: "{{ __sap_swpm_vars_line_item }} is defined and {{ __sap_swpm_vars_line_item }}" + fail_msg: "FAIL: '{{ __sap_swpm_vars_line_item }}' is either undefined or empty!" + success_msg: "PASS: '{{ __sap_swpm_vars_line_item }}' is set." + loop: + - sap_swpm_product_catalog_id + - sap_swpm_software_path + - sap_swpm_sid + - sap_swpm_fqdn + loop_control: + loop_var: __sap_swpm_vars_line_item + label: __sap_swpm_vars_line_item + tags: sap_swpm_generate_inifile + +- name: SAP SWPM Pre Install - Display these variables + ansible.builtin.debug: + msg: + - "sap_swpm_product_catalog_id: >{{ sap_swpm_product_catalog_id }}<" + - "sap_swpm_software_path: >{{ sap_swpm_software_path }}<" + - "sap_swpm_sid: >{{ sap_swpm_sid }}<" + - "sap_swpm_fqdn: >{{ sap_swpm_fqdn }}<" + +# We are creating the inifile dynamically in one of the two cases: +# 1 - The tag sap_swpm_generate_inifile is specified +# 2 - There is no file 'inifile.params' available in 'sap_swpm_inifile_directory' +# Prerequisite: Role parameter 'sap_swpm_product_catalog_id' is defined +- name: SAP SWPM Pre Install, create inifile - Create the SWPM inifile 'inifile.params' dynamically + when: "'sap_swpm_generate_inifile' in ansible_run_tags or (not __sap_swpm_register_stat_sapinst_inifile.stat.exists)" + tags: sap_swpm_generate_inifile + block: + +# - name: SAP SWPM Pre Install - Ensure role parameter 'sap_swpm_product_catalog_id' is defined +# ansible.builtin.fail: +# msg: +# - "Role parameter 'sap_swpm_product_catalog_id' is empty or not defined, so certain inifile entries cannot be determined." +# - "Remediation: Define the role parameter 'sap_swpm_product_catalog_id' in your playbook or inventory and re-run the playbook." +# when: sap_swpm_product_catalog_id is not defined or not sap_swpm_product_catalog_id + +# 3 tasks for setting password Facts, required by the template: + - name: SAP SWPM Pre Install - Set password facts when ABAP + ansible.builtin.set_fact: + sap_swpm_db_schema: "{{ sap_swpm_db_schema_abap }}" + sap_swpm_db_schema_password: "{{ sap_swpm_db_schema_abap_password }}" + when: "'ABAP' in sap_swpm_product_catalog_id" + + - name: SAP SWPM Pre Install - Set password facts when Java + ansible.builtin.set_fact: + sap_swpm_db_schema: "{{ sap_swpm_db_schema_java }}" + sap_swpm_db_schema_password: "{{ sap_swpm_db_schema_java_password }}" + when: "'Java' in sap_swpm_product_catalog_id" + + - 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 }}" + +# 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 for creating 'inifile.params' + ansible.builtin.template: + src: "{{ role_path }}/templates/inifile_params.j2" + dest: "{{ sap_swpm_tmpdir_local.path }}/inifile.params" + owner: 'root' + group: 'root' + mode: '0640' + delegate_to: localhost + when: + - sap_swpm_inifile_sections_list is defined + - sap_swpm_inifile_sections_list | length > 0 + +# Generate inifile.params, step 2: Use any entries from sap_swpm_inifile_parameters_dict + - name: SAP SWPM Pre Install, create inifile - Use any 'inifile.params' entries from 'sap_swpm_inifile_parameters_dict' + when: + - sap_swpm_inifile_parameters_dict is defined + - sap_swpm_inifile_parameters_dict | length > 0 + block: + + - name: SAP SWPM Pre Install, create inifile - Configure entries in 'inifile.params' from 'sap_swpm_inifile_parameters_dict' + ansible.builtin.lineinfile: + path: "{{ sap_swpm_tmpdir_local.path }}/inifile.params" + create: true + state: present + line: "{{ sap_swpm_line_item.key }} = {{ sap_swpm_line_item.value }}" + regexp: "^{{ sap_swpm_line_item.key }}[\\s]*=[\\s]*.*" + owner: 'root' + group: 'root' + mode: '0640' + loop: "{{ sap_swpm_inifile_parameters_dict | dict2items }}" + loop_control: + loop_var: sap_swpm_line_item + register: replace_result + delegate_to: localhost + + - name: SAP SWPM Pre Install, create inifile - Detect variables again if 'sap_swpm_inifile_parameters_dict' had been used + ansible.builtin.import_tasks: + file: detect_variables_from_inifile.yml + delegate_to: localhost + + - name: SAP SWPM Pre Install, create inifile - Display these variables again if 'sap_swpm_inifile_parameters_dict' had been used + ansible.builtin.debug: + msg: + - "sap_swpm_product_catalog_id: >{{ sap_swpm_product_catalog_id }}<" + - "sap_swpm_software_path: >{{ sap_swpm_software_path }}<" + - "sap_swpm_sid: >{{ sap_swpm_sid }}<" + - "sap_swpm_fqdn: >{{ sap_swpm_fqdn }}<" + delegate_to: localhost + +- name: SAP SWPM Pre Install - Display the path of the local 'inifile.params' + ansible.builtin.debug: + msg: "The local inifile.params is: '{{ sap_swpm_tmpdir_local.path }}/inifile.params'" + tags: sap_swpm_generate_inifile + +- name: SAP SWPM Pre Install - Slurp the local 'inifile.params' for copying to managed node + ansible.builtin.slurp: + src: "{{ sap_swpm_tmpdir_local.path }}/inifile.params" + register: sap_swpm_slurped_local_inifile + delegate_to: localhost + +- name: SAP SWPM Pre Install - Copy 'inifile.params' to the managed node + ansible.builtin.copy: + content: "{{ sap_swpm_slurped_local_inifile['content'] | b64decode }}" + dest: "{{ sap_swpm_tmpdir.path }}/inifile.params" + owner: 'root' + group: 'root' + mode: '0640' + +- name: SAP SWPM Pre Install - Display the path of the remote 'inifile.params' + ansible.builtin.debug: + msg: "The local inifile.params has been copied to: '{{ sap_swpm_tmpdir.path }}/inifile.params'" diff --git a/roles/sap_swpm/tasks/pre_install/install_type.yml b/roles/sap_swpm/tasks/pre_install/install_type.yml index ced5bbc98..b5afe12f0 100644 --- a/roles/sap_swpm/tasks/pre_install/install_type.yml +++ b/roles/sap_swpm/tasks/pre_install/install_type.yml @@ -4,7 +4,7 @@ - name: SAP SWPM Pre Install - Determine Installation Type ansible.builtin.set_fact: sap_swpm_swpm_installation_type: "" - sap_swpm_swpm_installation_header: "" + sap_swpm_swpm_installation_header: "Standard installation of SAP Software" sap_swpm_swpm_command_virtual_hostname: "" sap_swpm_swpm_command_mp_stack: "" @@ -58,9 +58,45 @@ # Run Installation Type Steps ################ -- name: SAP SWPM Pre Install - Display the Installation Type - ansible.builtin.debug: - var: sap_swpm_swpm_installation_type +- name: SAP SWPM Pre Install - Assert installation type is defined (including empty) + ansible.builtin.assert: + that: + - sap_swpm_swpm_installation_type is defined + fail_msg: + - "The installation type (variable 'sap_swpm_swpm_installation_type') is not defined!" + success_msg: + - "The installation type (variable 'sap_swpm_swpm_installation_type') is defined (including an empty string)." + +- name: SAP SWPM Pre Install - Assert supported installation types + ansible.builtin.assert: + that: + - sap_swpm_swpm_installation_type == '' or + sap_swpm_swpm_installation_type == 'restore' or + sap_swpm_swpm_installation_type == 'ha' or + sap_swpm_swpm_installation_type == 'maint_plan_stack' or + sap_swpm_swpm_installation_type == 'ha_maint_plan_stack' + fail_msg: + - "The specified installation type, '{{ sap_swpm_swpm_installation_type }}', is not supported!" + - "The following installation types are supported:" + - "- '' (empty string, the default)" + - "- 'restore'" + - "- 'ha'" + - "- 'maint_plan_stack'" + - "- 'ha_maint_plan_stack'" + success_msg: + - "The specified installation type, '{{ sap_swpm_swpm_installation_type }}', is supported." + +- name: SAP SWPM Pre Install - Assert that necessary variable for HA is defined + ansible.builtin.assert: + that: sap_swpm_virtual_hostname is defined and sap_swpm_virtual_hostname + fail_msg: "FAIL: {{ sap_swpm_virtual_hostname }} is not defined!" + success_msg: "PASS: The variable 'sap_swpm_virtual_hostname' is defined, as '{{ sap_swpm_virtual_hostname }}'." + when: + - sap_swpm_swpm_installation_type | regex_search('ha') + +################ +# Installation Type file will not be included if install type is empty (= the default): +################ - name: SAP SWPM Pre Install - Run Installation Type Steps ansible.builtin.include_tasks: "install_type/{{ sap_swpm_swpm_installation_type }}_install.yml" diff --git a/roles/sap_swpm/tasks/pre_install/password_facts.yml b/roles/sap_swpm/tasks/pre_install/password_facts.yml deleted file mode 100644 index 850283d88..000000000 --- a/roles/sap_swpm/tasks/pre_install/password_facts.yml +++ /dev/null @@ -1,22 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 ---- - -- name: SAP SWPM Pre Install - Set password facts when ABAP - ansible.builtin.set_fact: - sap_swpm_db_schema: "{{ sap_swpm_db_schema_abap }}" - sap_swpm_db_schema_password: "{{ sap_swpm_db_schema_abap_password }}" - when: - - "'ABAP' in sap_swpm_product_catalog_id" - -- name: SAP SWPM Pre Install - Set password facts when Java - ansible.builtin.set_fact: - sap_swpm_db_schema: "{{ sap_swpm_db_schema_java }}" - sap_swpm_db_schema_password: "{{ sap_swpm_db_schema_java_password }}" - when: - - "'Java' in sap_swpm_product_catalog_id" - -- 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 }}" diff --git a/roles/sap_swpm/tasks/swpm/prepare_software.yml b/roles/sap_swpm/tasks/pre_install/prepare_software.yml similarity index 99% rename from roles/sap_swpm/tasks/swpm/prepare_software.yml rename to roles/sap_swpm/tasks/pre_install/prepare_software.yml index 62ca21d1f..26e40fb98 100644 --- a/roles/sap_swpm/tasks/swpm/prepare_software.yml +++ b/roles/sap_swpm/tasks/pre_install/prepare_software.yml @@ -177,7 +177,7 @@ - sap_swpm_set_file_permissions - name: SAP SWPM Pre Install - Full SAP System - when: not sap_swpm_generic | bool + when: not sap_swpm_generic block: # 3. IGS diff --git a/roles/sap_swpm/tasks/swpm/swpm_pre_install.yml b/roles/sap_swpm/tasks/pre_install/swpm_prepare.yml similarity index 61% rename from roles/sap_swpm/tasks/swpm/swpm_pre_install.yml rename to roles/sap_swpm/tasks/pre_install/swpm_prepare.yml index 360df233f..f2ae6cb62 100644 --- a/roles/sap_swpm/tasks/swpm/swpm_pre_install.yml +++ b/roles/sap_swpm/tasks/pre_install/swpm_prepare.yml @@ -1,16 +1,24 @@ # SPDX-License-Identifier: Apache-2.0 --- -# Create temporary directory -- name: SAP SWPM Pre Install - Create temporary directory +- name: SAP SWPM Pre Install - Create temporary directory on control node ansible.builtin.tempfile: state: directory - suffix: swpmconfig - register: sap_swpm_tmpdir + suffix: _swpm_tmp + delegate_to: localhost + register: sap_swpm_tmpdir_local tags: - sap_swpm_generate_inifile - sap_swpm_sapinst_commandline +- name: SAP SWPM Pre Install - Create temporary directory on managed node + ansible.builtin.tempfile: + state: directory + suffix: _swpm_config + register: sap_swpm_tmpdir + tags: + - sap_swpm_sapinst_commandline + # Copy password file to the same location as inifile.params - name: SAP SWPM Pre Install - Copy password file to the same location as inifile.params ansible.builtin.copy: @@ -18,24 +26,33 @@ dest: "{{ sap_swpm_tmpdir.path }}/instkey.pkey" remote_src: yes mode: '0640' - when: sap_swpm_use_password_file == "y" - tags: sap_swpm_generate_inifile + when: sap_swpm_use_password_file -# Run SWPM inifile generation based on ansible role mode -- name: SAP SWPM Pre Install - generate swpm inifile - ansible.builtin.include_tasks: "swpm_inifile_generate_{{ sap_swpm_ansible_role_mode }}.yml" +# Create the SWPM inifile +- name: SAP SWPM Pre Install - Generate the SWPM inifile + ansible.builtin.include_tasks: "generate_inifile.yml" tags: sap_swpm_generate_inifile -- name: SAP SWPM Pre Install - Display the location of file 'inifile.params' - ansible.builtin.debug: - msg: "{{ sap_swpm_tmpdir.path }}/inifile.params" - tags: sap_swpm_generate_inifile +# Determine Installation Type, e.g. System Copy, HA, Maintenance Planner, ... +- name: SAP SWPM default mode - Determine Installation Type + ansible.builtin.include_tasks: + file: install_type.yml +# apply: +# tags: sap_swpm_generate_inifile +# tags: sap_swpm_generate_inifile + +# Requires variables - sap_swpm_software_path (e.g. /software/download_basket), sap_swpm_sapcar_path (e.g. /software/sapcar), sap_swpm_swpm_path (e.g. /software/swpm) +# Prepare Software +- name: SAP SWPM Pre Install - Prepare Software + ansible.builtin.include_tasks: prepare_software.yml + when: sap_swpm_run_sapinst # Set fact for SWPM path - name: SAP SWPM Pre Install - Set fact for SWPM path when extract directory defined ansible.builtin.set_fact: sap_swpm_sapinst_path: "{{ sap_swpm_software_extract_directory }}" when: + - sap_swpm_run_sapinst - sap_swpm_software_extract_directory is defined - not (sap_swpm_software_extract_directory is none or (sap_swpm_software_extract_directory | length == 0)) @@ -44,6 +61,7 @@ ansible.builtin.set_fact: sap_swpm_sapinst_path: "{{ (sap_swpm_swpm_path | regex_replace('\\/$', '')) + '/extracted' }}" when: + - sap_swpm_run_sapinst - sap_swpm_software_extract_directory is undefined or (sap_swpm_software_extract_directory is none or (sap_swpm_software_extract_directory | length) == 0) - name: SAP SWPM Pre Install - Ensure directory '{{ sap_swpm_sapinst_path }}' exists @@ -51,6 +69,7 @@ path: "{{ sap_swpm_sapinst_path }}" state: directory mode: '0755' + when: sap_swpm_run_sapinst # Extract SWPM - name: SAP SWPM Pre Install - Extract SWPM @@ -62,3 +81,4 @@ args: chdir: "{{ sap_swpm_sapinst_path }}" changed_when: "'SAPCAR: processing archive' in sap_swpm_extractswpm.stdout" + when: sap_swpm_run_sapinst diff --git a/roles/sap_swpm/tasks/pre_install/update_etchosts.yml b/roles/sap_swpm/tasks/pre_install/update_etchosts.yml index 4adbdcf34..815ae29e6 100644 --- a/roles/sap_swpm/tasks/pre_install/update_etchosts.yml +++ b/roles/sap_swpm/tasks/pre_install/update_etchosts.yml @@ -1,75 +1,61 @@ # SPDX-License-Identifier: Apache-2.0 --- -# Update etc hosts for NW +# Update /etc/hosts for NW -- name: SAP SWPM Pre Install - Display warning message if '/etc/hosts' is not configured for NW due to missing 'sap_swpm_fqdn' +- name: SAP SWPM Pre Install - Display warning message if '/etc/hosts' will not be configured for NW due to missing 'sap_swpm_fqdn' ansible.builtin.debug: msg: "WARN: Not configuring NW entries in '/etc/hosts' because 'sap_swpm_fqdn' is not defined!" when: (sap_swpm_fqdn | type_debug == 'NoneType') or (sap_swpm_fqdn | length == 0) -# Update etc hosts for HANA - - name: SAP SWPM Pre Install - Update '/etc/hosts' for NW + ansible.builtin.import_role: + name: 'community.sap_install.sap_maintain_etc_hosts' + vars: + sap_maintain_etc_hosts_list: + - node_ip: "{{ ansible_default_ipv4.address | d(ansible_all_ipv4_addresses[0]) }}" + node_name: "{{ ansible_hostname }}" + node_domain: "{{ sap_swpm_fqdn }}" + state: present when: - "sap_swpm_fqdn | type_debug != 'NoneType'" - "sap_swpm_fqdn | length > 0" - block: - - - name: SAP SWPM Pre Install - Deduplicate values from '/etc/hosts' - ansible.builtin.lineinfile: - path: /etc/hosts - create: false - regexp: (?i)^\s*{{ ansible_default_ipv4.address | d(ansible_all_ipv4_addresses[0]) }}\s+ - state: absent -# Reason for noqa: 1. Tabs can increase readability; -# 2. Tabs are allowed for /etc/hosts - - name: SAP SWPM Pre Install - Update '/etc/hosts' with NW entry # noqa no-tabs - ansible.builtin.lineinfile: - path: /etc/hosts - line: "{{ ansible_default_ipv4.address | d(ansible_all_ipv4_addresses[0]) }}\t{{ ansible_hostname }}.{{ sap_swpm_fqdn }}\t{{ ansible_hostname }}" +# Update /etc/hosts for HANA -- name: SAP SWPM Pre Install - Display warning message if '/etc/hosts' is not configured for HANA due to missing 'sap_swpm_db_ip' +- name: SAP SWPM Pre Install - Display warning message if '/etc/hosts' will not be configured for HANA due to missing 'sap_swpm_db_ip' ansible.builtin.debug: msg: "WARN: Not configuring HANA entries in '/etc/hosts' because 'sap_swpm_db_ip' is not defined!" when: (sap_swpm_db_ip | type_debug == 'NoneType') or (sap_swpm_db_ip | length == 0) -- name: SAP SWPM Pre Install - Display warning message if '/etc/hosts' is not configured for HANA due to missing 'sap_swpm_db_host' +- name: SAP SWPM Pre Install - Display warning message if '/etc/hosts' will not be configured for HANA due to missing 'sap_swpm_db_host' ansible.builtin.debug: msg: "WARN: Not configuring HANA entries in '/etc/hosts' because 'sap_swpm_db_host' is not defined!" when: (sap_swpm_db_host | type_debug == 'NoneType') or (sap_swpm_db_host | length == 0) -- name: SAP SWPM Pre Install - Display warning message if '/etc/hosts' is not configured for HANA because 'sap_swpm_db_host' is the current host +- name: SAP SWPM Pre Install - Display warning message if '/etc/hosts' will not be configured for HANA because 'sap_swpm_db_host' is the current host ansible.builtin.debug: msg: "WARN: Not configuring HANA entries in '/etc/hosts' because 'sap_swpm_db_host' is the current host!" when: sap_swpm_db_host == ansible_hostname - name: SAP SWPM Pre Install - Update '/etc/hosts' for HANA + ansible.builtin.import_role: + name: 'community.sap_install.sap_maintain_etc_hosts' + vars: + sap_maintain_etc_hosts_list: + - node_ip: "{{ sap_swpm_db_ip }}" + node_name: "{{ sap_swpm_db_host }}" + node_domain: "{{ sap_swpm_fqdn }}" + state: present when: - "sap_swpm_db_ip | type_debug != 'NoneType'" - "sap_swpm_db_ip | length > 0" - "sap_swpm_db_host | type_debug != 'NoneType'" - "sap_swpm_db_host | length > 0" - "sap_swpm_db_host != ansible_hostname" - block: - - - name: SAP SWPM Pre Install - Deduplicate values from '/etc/hosts' - ansible.builtin.lineinfile: - path: /etc/hosts - create: false - regexp: (?i)^\s*{{ sap_swpm_db_ip }}\s+ - state: absent - -# Reason for noqa: 1. Tabs can increase readability; -# 2. Tabs are allowed for /etc/hosts - - name: SAP SWPM Pre Install - Update '/etc/hosts' with HANA entry # noqa no-tabs - ansible.builtin.lineinfile: - path: /etc/hosts - line: "{{ sap_swpm_db_ip }}\t{{ sap_swpm_db_host }}.{{ sap_swpm_fqdn }}\t{{ sap_swpm_db_host }}" diff --git a/roles/sap_swpm/tasks/swpm.yml b/roles/sap_swpm/tasks/swpm.yml index 462587505..d9d0bd4eb 100644 --- a/roles/sap_swpm/tasks/swpm.yml +++ b/roles/sap_swpm/tasks/swpm.yml @@ -23,17 +23,19 @@ ### Async method -- name: Set fact for the sapinst command line - ansible.builtin.set_fact: - __sap_swpm_sapinst_command: "umask {{ sap_swpm_umask | d('022') }} ; ./sapinst {{ sap_swpm_swpm_command_inifile }} - {{ sap_swpm_swpm_command_product_id }} - {{ sap_swpm_swpm_command_extra_args }}" - tags: sap_swpm_sapinst_commandline - -- name: Display the sapinst command line - ansible.builtin.debug: - msg: "SAP SWPM install command: '{{ __sap_swpm_sapinst_command }}'" - tags: sap_swpm_sapinst_commandline +# now in file pre_install.yml: +#- name: Set fact for the sapinst command line +# ansible.builtin.set_fact: +# __sap_swpm_sapinst_command: "umask {{ sap_swpm_umask | d('022') }} ; ./sapinst {{ sap_swpm_swpm_command_inifile }} +# {{ sap_swpm_swpm_command_product_id }} +# {{ sap_swpm_swpm_command_extra_args }}" +# tags: sap_swpm_sapinst_commandline + +# now in file pre_install.yml: +#- name: Display the sapinst command line +# ansible.builtin.debug: +# msg: "SAP SWPM install command: '{{ __sap_swpm_sapinst_command }}'" +# tags: sap_swpm_sapinst_commandline # Call sapinst synchronously # Reason for noqa: This command installs software, so it will change things diff --git a/roles/sap_swpm/tasks/swpm/detect_variables.yml b/roles/sap_swpm/tasks/swpm/detect_variables.yml deleted file mode 100644 index 557c988ad..000000000 --- a/roles/sap_swpm/tasks/swpm/detect_variables.yml +++ /dev/null @@ -1,80 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 ---- - -# Detect Product ID -- name: SAP SWPM - Detect Product ID - ansible.builtin.command: | - awk 'BEGIN{IGNORECASE=1;a=0} - /Product ID/&&a==0{a=1; gsub ("#", ""); gsub ("\047", ""); product_id=$NF} - 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: - msg: - - "Product ID is {{ sap_swpm_product_catalog_id }}" - -# Detect Software Path -- name: SAP SWPM - Detect Software Path - ansible.builtin.command: | - 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: - msg: - - "Software path is {{ sap_swpm_software_path }}" - -# Detect SID -- name: SAP SWPM - Detect SID - ansible.builtin.command: | - 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: - msg: - - "SAP SID {{ sap_swpm_sid }}" - -# Detect FQDN -- name: SAP SWPM - Detect FQDN - ansible.builtin.command: | - 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: - msg: - - "SAP fqdn {{ sap_swpm_fqdn }}" diff --git a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced.yml b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced.yml deleted file mode 100644 index 234dfb5db..000000000 --- a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced.yml +++ /dev/null @@ -1,35 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 ---- - -# Remove Existing inifile.params -- name: SAP SWPM advanced mode - Ensure 'inifile.params' exists - ansible.builtin.copy: - dest: "{{ sap_swpm_tmpdir.path }}/inifile.params" - mode: '0640' - content: | - ### inifile.params generated for SWPM Catalog Product ID is {{ sap_swpm_product_catalog_id }} - tags: sap_swpm_generate_inifile - -- name: SAP SWPM advanced mode - Loop over the dictionary and output to file - ansible.builtin.lineinfile: - path: "{{ sap_swpm_tmpdir.path }}/inifile.params" - state: present - insertafter: EOF - line: "{{ item.key }} = {{ item.value }}" - with_dict: "{{ sap_swpm_inifile_custom_values_dictionary }}" - tags: sap_swpm_generate_inifile - -# NOTE: Values in Dictionary Keys for instance numbers must be string using '01' single quote, otherwise SAP SWPM will crash - -# Detect variables from generated inifile -- name: SAP SWPM advanced mode - Detect Variables - ansible.builtin.include_tasks: - file: detect_variables.yml - apply: - tags: sap_swpm_generate_inifile - tags: sap_swpm_generate_inifile - -# Requires variables - sap_swpm_software_path (e.g. /software/download_basket), sap_swpm_sapcar_path (e.g. /software/sapcar), sap_swpm_swpm_path (e.g. /software/swpm) -# Prepare Software -- name: SAP SWPM advanced mode - Prepare Software - ansible.builtin.include_tasks: prepare_software.yml diff --git a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced_templates.yml b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced_templates.yml deleted file mode 100644 index b6685e343..000000000 --- a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_advanced_templates.yml +++ /dev/null @@ -1,64 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 ---- - -# Set facts based on the install dictionary -- name: SAP SWPM advanced_templates mode - Set product_catalog_id - ansible.builtin.set_fact: - sap_swpm_product_catalog_id: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_product_catalog_id'] }}" - tags: sap_swpm_generate_inifile - -- name: SAP SWPM advanced_templates mode - Create temporary directory - ansible.builtin.tempfile: - state: directory - suffix: swpmconfig - register: sap_swpm_tmpdir - tags: sap_swpm_generate_inifile - -# Remove Existing inifile.params -- name: SAP SWPM advanced_templates mode - Ensure 'inifile.params' exists - ansible.builtin.copy: - dest: "{{ sap_swpm_tmpdir.path }}/inifile.params" - mode: '0640' - content: | - ### inifile.params generated for SWPM Catalog Product ID is {{ sap_swpm_product_catalog_id }} - tags: sap_swpm_generate_inifile - -- name: SAP SWPM advanced_templates mode - Loop over the dictionary and output to file - ansible.builtin.lineinfile: - path: "{{ sap_swpm_tmpdir.path }}/inifile.params" - state: present - insertafter: EOF - line: "{{ item.key }} = {{ item.value }}" - with_dict: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_custom_values_dictionary'] }}" - tags: sap_swpm_generate_inifile - -# NOTE: Values in Dictionary Keys for instance numbers must be string using '01' single quote, otherwise SAP SWPM will crash - - -# Detect variables from generated inifile -- name: SAP SWPM advanced_templates mode - Detect Variables - ansible.builtin.include_tasks: - file: detect_variables.yml - apply: - tags: sap_swpm_generate_inifile - tags: sap_swpm_generate_inifile - -# Requires variables - sap_swpm_software_path (e.g. /software/download_basket), sap_swpm_sapcar_path (e.g. /software/sapcar), sap_swpm_swpm_path (e.g. /software/swpm) -# Prepare Software -- name: SAP SWPM advanced_templates mode - Prepare Software - ansible.builtin.include_tasks: prepare_software.yml - -# ALT: Generate complete inifile.params with all parameters from control.xml, for every SAP software product -#- name: ALT: SAP SWPM advanced_templates mode - Generate complete inifile.params -# script: ./plugins/module_utils/swpm2_parameters_inifile_generate.py '/path/to/controlxml/' -# args: -# executable: /bin/python3 - -# ALT: Replace values of generated inifile with custom values -#- name: ALT: SAP SWPM advanced_templates mode - Replace values of generated inifile with custom values -# replace: -# path: "{{ sap_swpm_tmpdir.path }}/inifile.params" -# regexp: '^{{ item.key }}.*$' -# replace: '{{ item.key }}={{ item.value }}' -# backup: yes -# with_dict: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_custom_values_dictionary'] }}" diff --git a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default.yml b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default.yml deleted file mode 100644 index b04362cb6..000000000 --- a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default.yml +++ /dev/null @@ -1,31 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 ---- - -# Determine Installation Type -- name: SAP SWPM default mode - Determine Installation Type - ansible.builtin.include_tasks: - file: ../pre_install/install_type.yml - apply: - tags: sap_swpm_generate_inifile - tags: sap_swpm_generate_inifile - -# Password Facts -- name: SAP SWPM default mode - Password Facts - ansible.builtin.include_tasks: - file: ../pre_install/password_facts.yml - apply: - tags: sap_swpm_generate_inifile - tags: sap_swpm_generate_inifile - -# Prepare Software -- name: SAP SWPM default mode - Prepare Software - ansible.builtin.include_tasks: prepare_software.yml - -# Process SWPM Configfile Template -- name: SAP SWPM default mode - Process SWPM Configfile Template - ansible.builtin.template: - src: "{{ role_path }}/templates/configfile.j2" - dest: "{{ sap_swpm_tmpdir.path }}/inifile.params" - mode: '0640' - register: sap_swpm_cftemplate - tags: sap_swpm_generate_inifile diff --git a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default_templates.yml b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default_templates.yml deleted file mode 100644 index b51706218..000000000 --- a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_default_templates.yml +++ /dev/null @@ -1,51 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 ---- - -# Set facts based on the install dictionary -- name: SAP SWPM default_templates mode - Set product_catalog_id and inifile_list - ansible.builtin.set_fact: - sap_swpm_product_catalog_id: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_product_catalog_id'] }}" - sap_swpm_inifile_list: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_list'] }}" - tags: sap_swpm_generate_inifile - -- name: SAP SWPM default_templates mode - Set product_catalog_id and inifile_list - ansible.builtin.set_fact: - sap_swpm_java_template_id_selected_list: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_java_template_id_selected_list'] }}" - when: "'java' in sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_product_catalog_id'] | lower" - tags: sap_swpm_generate_inifile - -# Reason for noqa: We want to define variable names based on what is in the dictionary. -- name: SAP SWPM default_templates mode - If not already defined, use the default variable for the template # noqa var-naming[no-jinja] - ansible.builtin.set_fact: - "{{ item.key }}": "{{ item.value }}" - with_dict: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['sap_swpm_inifile_dictionary'] }}" - tags: sap_swpm_generate_inifile - -# Determine Installation Type -- name: SAP SWPM default_templates mode - Determine Installation Type - ansible.builtin.include_tasks: - file: ../pre_install/install_type.yml - apply: - tags: sap_swpm_generate_inifile - tags: sap_swpm_generate_inifile - -# Password Facts -- name: SAP SWPM default_templates mode - Password Facts - ansible.builtin.include_tasks: - file: ../pre_install/password_facts.yml - apply: - tags: sap_swpm_generate_inifile - tags: sap_swpm_generate_inifile - -# Prepare Software -- name: SAP SWPM default_templates mode - Prepare Software - ansible.builtin.include_tasks: prepare_software.yml - -# Process SWPM Configfile Template -- name: SAP SWPM default_templates mode - Process SWPM Configfile Template - ansible.builtin.template: - src: "{{ role_path }}/templates/configfile.j2" - dest: "{{ sap_swpm_tmpdir.path }}/inifile.params" - mode: '0640' - register: sap_swpm_cftemplate - tags: sap_swpm_generate_inifile diff --git a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_inifile_reuse.yml b/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_inifile_reuse.yml deleted file mode 100644 index b22ef3481..000000000 --- a/roles/sap_swpm/tasks/swpm/swpm_inifile_generate_inifile_reuse.yml +++ /dev/null @@ -1,39 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 ---- - -# Copy reused inifile -- name: SAP SWPM inifile_reuse mode - Copy reused inifile - ansible.builtin.copy: - src: "{{ sap_swpm_inifile_reuse_source }}" - dest: "{{ sap_swpm_tmpdir.path }}/inifile.params" - mode: '0640' - tags: sap_swpm_generate_inifile - -# Check inifile for the presence of a line containing "des25(" -- name: SAP SWPM inifile_reuse mode - Check inifile for des25 - ansible.builtin.shell: | - set -o pipefail && cat "{{ sap_swpm_tmpdir.path }}/inifile.params" | - awk 'BEGIN{a=0}!/^#/&&/des25\(/{a++}END{print a}' - register: sap_swpm_inifile_read_file - changed_when: false - tags: sap_swpm_generate_inifile - -# Check if inifile is reusable - function des25 must not be present in inifile -- name: SAP SWPM inifile_reuse mode - Check if inifile is reusable, meaning function des25 is not present - ansible.builtin.fail: - msg: "{{ sap_swpm_inifile_reuse_source }} is not reusable" - when: sap_swpm_inifile_read_file.stdout != '0' - tags: sap_swpm_generate_inifile - -# Detect variables from generated inifile -- name: SAP SWPM inifile_reuse mode - Detect Variables - ansible.builtin.include_tasks: - file: detect_variables.yml - apply: - tags: sap_swpm_generate_inifile - tags: sap_swpm_generate_inifile - -# Requires variables - sap_swpm_software_path (e.g. /software/download_basket), sap_swpm_sapcar_path (e.g. /software/sapcar), sap_swpm_swpm_path (e.g. /software/swpm) -# Prepare Software -- name: SAP SWPM inifile_reuse mode - Prepare Software - ansible.builtin.include_tasks: prepare_software.yml diff --git a/roles/sap_swpm/templates/configfile.j2 b/roles/sap_swpm/templates/configfile.j2 deleted file mode 100644 index e71291e11..000000000 --- a/roles/sap_swpm/templates/configfile.j2 +++ /dev/null @@ -1,959 +0,0 @@ -### inifile.params generated for SWPM Catalog Product ID is {{ sap_swpm_product_catalog_id }} - -{% if 'swpm_installation_media' in sap_swpm_inifile_list %} -###### -# swpm_installation_media -###### -archives.downloadBasket = {{ sap_swpm_software_path }} - -# installation_export.archivesFolder = {{ sap_swpm_cd_export_path }} - -# NOTE: Specific media requirements will use format -# SAPINST.CD.PACKAGE. = -{% endif %} -{% if 'swpm_installation_media_swpm2_hana' in sap_swpm_inifile_list %} - -###### -# swpm_installation_media_swpm2_hana -###### -HDB_Software_Dialogs.useMediaCD = {{ sap_swpm_software_use_media }} -{% endif %} -{% if 'swpm_installation_media_swpm1' in sap_swpm_inifile_list %} - -###### -# swpm_installation_media_swpm1 -###### -SAPINST.CD.PACKAGE.LANGUAGE = {{ sap_swpm_cd_language_path }} -SAPINST.CD.PACKAGE.JAVA = {{ sap_swpm_cd_java_path }} -SAPINST.CD.PACKAGE.RDBMS = {{ sap_swpm_cd_rdbms_path }} -# SAPINST.CD.PACKAGE.KERNEL = -# SAPINST.CD.PACKAGE.KERNEL2 = -# SAPINST.CD.PACKAGE.KERNEL3 = - -# SAPINST.CD.PACKAGE.JAVA_EXPORT = /path/JAVA_EXPORT -# SAPINST.CD.PACKAGE.JDMP = /path/JAVA_EXPORT_JDMP -# SAPINST.CD.PACKAGE.J2EE = /path/JAVA_J2EE_OSINDEP -# SAPINST.CD.PACKAGE.J2EE-INST = /path/JAVA_J2EE_OSINDEP_J2EE_INST -# SAPINST.CD.PACKAGE.SCA = /path/JAVA_J2EE_OSINDEP_UT -{% endif %} -{% if 'swpm_installation_media_swpm1_exportfiles' in sap_swpm_inifile_list %} - -###### -# swpm_installation_media_swpm1_exportfiles -###### -SAPINST.CD.PACKAGE.EXPORT = {{ sap_swpm_cd_export_path }} -# SAPINST.CD.PACKAGE.LOAD = -SAPINST.CD.PACKAGE.LOAD1 = {{ sap_swpm_cd_export_pt1_path }} -SAPINST.CD.PACKAGE.LOAD2 = {{ sap_swpm_cd_export_pt2_path }} -# SAPINST.CD.PACKAGE.JMIG = -{% endif %} -{% if 'swpm_installation_media_swpm1_ibmdb2' in sap_swpm_inifile_list %} - -###### -# swpm_installation_media_swpm1_ibmdb2 -###### -# Requested package : RDBMS-DB6 -SAPINST.CD.PACKAGE.DB2 = {{ sap_swpm_cd_ibmdb2_path }} - -# Requested package : RDBMS-DB6 CLIENT -SAPINST.CD.PACKAGE.DB2CLIENT = {{ sap_swpm_cd_ibmdb2_client_path }} - -# IBM DB2 software unpack path e.g. /db2/db2x01/db2_software -db6.DB2SoftwarePath = {{ sap_swpm_ibmdb2_unpack_path }} -{% endif %} -{% if 'swpm_installation_media_swpm1_oracledb_121' in sap_swpm_inifile_list %} - -###### -# swpm_installation_media_swpm1_oracledb_121 -###### -# Requested package : RDBMS-ORA -SAPINST.CD.PACKAGE.RDBMS-ORA121 = {{ sap_swpm_cd_oracle_path }} - -# Requested package : RDBMS-ORA CLIENT -SAPINST.CD.PACKAGE.ORACLI121 = {{ sap_swpm_cd_oracle_client_path }} -{% endif %} -{% if 'swpm_installation_media_swpm1_oracledb_122' in sap_swpm_inifile_list %} - -###### -# swpm_installation_media_swpm1_oracledb_122 -###### -# Requested package : RDBMS-ORA -SAPINST.CD.PACKAGE.RDBMS-ORA122 = {{ sap_swpm_cd_oracle_path }} - -# Requested package : RDBMS-ORA CLIENT -SAPINST.CD.PACKAGE.ORACLI122 = {{ sap_swpm_cd_oracle_client_path }} -{% endif %} -{% if 'swpm_installation_media_swpm1_oracledb_19' in sap_swpm_inifile_list %} - -###### -# swpm_installation_media_swpm1_oracledb_19 -###### -# Requested package : RDBMS-ORA -SAPINST.CD.PACKAGE.RDBMS-ORA19 = {{ sap_swpm_cd_oracle_path }} - -# Requested package : RDBMS-ORA CLIENT -SAPINST.CD.PACKAGE.ORACLI19 = {{ sap_swpm_cd_oracle_client_path }} -{% endif %} -{% if 'swpm_installation_media_swpm1_sapase' in sap_swpm_inifile_list %} - -###### -# swpm_installation_media_swpm1_sapase -###### -# Requested package : RDBMS-SYB -SAPINST.CD.PACKAGE.RDBMS-SYB = {{ sap_swpm_cd_sapase_path }} -SAPINST.CD.PACKAGE.RDBMS-SYB-CLIENT = {{ sap_swpm_cd_sapase_client_path }} - -{% endif %} -{% if 'swpm_installation_media_swpm1_sapmaxdb' in sap_swpm_inifile_list %} - -###### -# swpm_installation_media_swpm1_sapmaxdb -###### -# Requested package : RDBMS-ADA -SAPINST.CD.PACKAGE.RDBMS-ADA = {{ sap_swpm_cd_sapmaxdb_path }} -{% endif %} -{% if 'maintenance_plan_stack_tms_config' in sap_swpm_inifile_list %} - -###### -# maintenance_plan_stack_tms_config -###### -NW_ABAP_TMSConfig.configureTMS = {{ sap_swpm_configure_tms | lower }} -NW_ABAP_TMSConfig.transportPassword = {{ sap_swpm_tmsadm_password }} -{% endif %} -{% if 'maintenance_plan_stack_tms_transports' in sap_swpm_inifile_list %} - -###### -# maintenance_plan_stack_tms_transports -###### -NW_ABAP_Include_Corrections.includeTransports = true -NW_ABAP_Include_Corrections.transportFilesLocations = {{ sap_swpm_tms_tr_files_path }} -{% endif %} -{% if 'maintenance_plan_stack_spam_config' in sap_swpm_inifile_list %} - -###### -# maintenance_plan_stack_spam_config -###### -NW_ABAP_SPAM_Update.SPAMUpdateDecision = {{ sap_swpm_spam_update | lower }} -{% if sap_swpm_spam_update %} -NW_ABAP_SPAM_Update.SPAMUpdateArchive = {{ sap_swpm_spam_update_sar }} -{% else %} -#NW_ABAP_SPAM_Update.SPAMUpdateArchive = -{% endif %} -{% endif %} -{% if 'maintenance_plan_stack_sum_config' in sap_swpm_inifile_list %} - -###### -# maintenance_plan_stack_sum_config -###### -NW_ABAP_Prepare_SUM.prepareSUM = {{ sap_swpm_sum_prepare | lower }} -NW_ABAP_Prepare_SUM.startSUM = {{ sap_swpm_sum_start | lower }} - -# Password for SUM must be for 'adm' user -NW_ABAP_Prepare_SUM.Password = {{ sap_swpm_sap_sidadm_password }} -{% endif %} -{% if 'maintenance_plan_stack_sum_10_batch_mode' in sap_swpm_inifile_list %} - -###### -# maintenance_plan_stack_sum_10_batch_mode -###### -# Re-run of existing BatchModeInputFile.xml for NWAS JAVA (generated by SUM 1.0 on previous host into the /sdt/param/ subdirectory) -NW_ABAP_Prepare_SUM.SUMBatchFile = {{ sap_swpm_sum_batch_file }} -{% endif %} -{% if 'credentials' in sap_swpm_inifile_list %} - -###### -# credentials -###### -# Master password -NW_GetMasterPassword.masterPwd = {{ sap_swpm_master_password }} - -# 'adm' user -nwUsers.sidadmPassword = {{ sap_swpm_sap_sidadm_password }} - -DiagnosticsAgent.dasidAdmPassword = {{ sap_swpm_diagnostics_agent_password }} - -# 'sapadm' user of the SAP Host Agent -hostAgent.sapAdmPassword = {{ sap_swpm_sapadm_password }} -{% endif %} -{% if 'credentials_hana' in sap_swpm_inifile_list %} - -###### -# credentials_hana -###### -HDB_Schema_Check_Dialogs.schemaPassword = {{ sap_swpm_db_schema_password }} -storageBasedCopy.hdb.systemPassword = {{ sap_swpm_db_system_password }} -{% endif %} -{% if 'credentials_anydb_ibmdb2' in sap_swpm_inifile_list %} - -###### -# credentials_anydb_ibmdb2 -###### -nwUsers.db6.db2sidPassword = {{ sap_swpm_sap_sidadm_password }} -# nwUsers.db6.db2sidUid = -{% endif %} -{% if 'credentials_anydb_oracledb' in sap_swpm_inifile_list %} - -###### -# credentials_anydb_oracledb -###### -# Oracle database software owner -ora.oraclePassword = {{ sap_swpm_sap_sidadm_password }} - -# 'ora' user -ora.orasidPassword = {{ sap_swpm_sap_sidadm_password }} - -# Oracle 'SYS' password -ora.SysPassword = {{ sap_swpm_db_system_password }} - -# Oracle 'SYSTEM' password -ora.SystemPassword = {{ sap_swpm_db_system_password }} -{% endif %} -{% if 'credentials_anydb_sapase' in sap_swpm_inifile_list %} - -###### -# credentials_anydb_sapase -###### -nwUsers.syb.sybsidPassword = {{ sap_swpm_sap_sidadm_password }} -SYB.NW_DB.sa_pass = {{ sap_swpm_master_password }} -SYB.NW_DB.sapsa_pass = {{ sap_swpm_master_password }} -SYB.NW_DB.sapsr3_pass = {{ sap_swpm_master_password }} -SYB.NW_DB.sapsr3db_pass = {{ sap_swpm_db_system_password }} -# SYB.NW_DB.encryptionMasterKeyPassword = -# SYB.NW_DB.sapsso_pass = -# SYB.NW_DB.sslPassword = -{% endif %} -{% if 'credentials_anydb_sapmaxdb' in sap_swpm_inifile_list %} - -###### -# credentials_anydb_sapmaxdb -# -# The password of user DBUser may only consist of alphanumeric characters and the special characters #, $, @ and _ -###### -nwUsers.ada.sqdsidPassword = {{ sap_swpm_sap_sidadm_password }} -Sdb_DBUser.dbaPassword = {{ sap_swpm_db_system_password }} -Sdb_DBUser.dbmPassword = {{ sap_swpm_db_system_password }} -Sdb_Schema_Dialogs.dbSchemaPassword = {{ sap_swpm_db_schema_password }} -{% endif %} -{% if 'credentials_nwas_ssfs' in sap_swpm_inifile_list %} - -###### -# credentials_nwas_ssfs -###### -HDB_Userstore.useABAPSSFS = true -# NW_ABAP_SSFS_CustomKey.ssfsKeyInputFile = -{% endif %} -{% if 'credentials_hdbuserstore' in sap_swpm_inifile_list %} - -###### -# credentials_hdbuserstore -###### -HDB_Userstore.useABAPSSFS = false -# HDB_Userstore.doNotResolveHostnames = -# HDB_Userstore.HDB_USE_IDENT = -# HDB_Userstore.systemDBPort = -# NW_HDB_DBClient.checkCreateUserstore = true -# NW_HDB_DBClient.clientPathStrategy = LOCAL -{% endif %} -{% if 'credentials_syscopy' in sap_swpm_inifile_list %} - -###### -# credentials_syscopy -###### -# Are the passwords for the DDIC users different from the default value? -NW_DDIC_Password.needDDICPasswords = true -NW_DDIC_Password.ddic000Password = {{ sap_swpm_ddic_000_password }} -#NW_DDIC_Password.ddic001Password = -{% endif %} -{% if 'db_config_hana' in sap_swpm_inifile_list %} - -###### -# db_config_hana -###### -storageBasedCopy.hdb.instanceNumber = {{ sap_swpm_db_instance_nr }} -HDB_Schema_Check_Dialogs.schemaName = {{ sap_swpm_db_schema }} -{% if 'nw_config_additional_application_server_instance' in sap_swpm_inifile_list %} - -HDB_Schema_Check_Dialogs.validateSchemaName = true -{% else %} -HDB_Schema_Check_Dialogs.validateSchemaName = false -{% endif %} - -# HDB_Schema_Check_Dialogs.dropSchema = false -# hdb.create.dbacockpit.user = false -{% endif %} -{% if 'db_config_anydb_all' in sap_swpm_inifile_list %} - -###### -# db_config_anydb_all -###### -NW_ABAP_Import_Dialog.dbCodepage = 4103 -{% endif %} -{% if 'db_config_anydb_ibmdb2' in sap_swpm_inifile_list %} - -###### -# db_config_anydb_ibmdb2 -###### -NW_ABAP_Import_Dialog.migmonJobNum = 3 -NW_ABAP_Import_Dialog.migmonLoadArgs = -stop_on_error -loadprocedure fast LOAD:COMPRESS_ALL:DEF_CRT -NW_getDBInfoGeneric.dbhost = {{ sap_swpm_db_host }} -NW_getDBInfoGeneric.dbsid = {{ sap_swpm_db_sid }} -NW_getUnicode.isUnicode = true -# db6.useMcod = true -# db6.useBluSettings = false -# db6.gid_sysadm = -# db6.gid_sysctrl = -# db6.gid_sysmaint = -# db6.gid_sysmon = -db6.allowUnsignedDatabaseSoftware = true -db6.cluster.ClusterType = HADR (High Availability Disaster Recovery) -db6.createTablespacesUsingSapinst = true -db6.minimizeDatabaseSizeCompression = true -db6.TablespacePoolSizes = SAPSID#DATA{20} -db6.useAutoStorage = true -db6.useExtraSapdataSaptmpDirLayout = false -db6.UseStandardTablespacePool = true -db6.usesLDAP = false -storageBasedCopy.db6.CommunicationPortNumber = 5912 -storageBasedCopy.db6.PortRangeEnd = 5917 -storageBasedCopy.db6.PortRangeStart = 5914 -{% endif %} -{% if 'db_config_anydb_oracledb' in sap_swpm_inifile_list %} - -###### -# db_config_anydb_oracledb -###### -NW_ABAP_Import_Dialog.migmonJobNum = 3 -NW_ABAP_Import_Dialog.migmonLoadArgs = -stop_on_error -loadprocedure fast -NW_getDBInfoGeneric.dbsid = {{ sap_swpm_db_sid }} -storageBasedCopy.ora.listenerName = SAPORALISTENER -# storageBasedCopy.ora.listenerPort = -storageBasedCopy.ora.ABAPSchema = {{ sap_swpm_db_schema_abap }} -# storageBasedCopy.ora.JavaSchema = {{ sap_swpm_db_schema_java }} -# storageBasedCopy.ora.swowner = oracle -ora.createStatisticsCodeABAP = SKIP -ora.createStatisticsCodeJAVA = SKIP -ora.multitenant.pdbsid = {{ sap_swpm_sid | upper }} -ora.whatInstallation = isSingle -# ora.IgnoreClientVersion = false -# ora.maxDatafileSize = 2000 - -#### Oracle Multitenant Pluggable DB: #### -#### a single Oracle Container Database (CDB) can host multiple Oracle Pluggable Databases (PDB) #### -## FALSE: no pluggable installation (default value) -## CDB_PDB: install CDB and PDB -## PDB_ONLY: install PDB only in an existing CDB. -## CDB_ONLY: install CDB only. -ora.multitenant.installMT = FALSE -{% endif %} -{% if 'db_config_anydb_oracledb_121' in sap_swpm_inifile_list %} - -###### -# db_config_anydb_oracledb_121 -# Use path to Oracle Home - Runtime (i.e. $OHRDBMS env var) -###### -ora.dbhome = /oracle/{{ sap_swpm_db_sid }}/121 -storageBasedCopy.ora.clientVersion = 121 -storageBasedCopy.ora.serverVersion = 121 -{% endif %} -{% if 'db_config_anydb_oracledb_122' in sap_swpm_inifile_list %} - -###### -# db_config_anydb_oracledb_122 -# Use path to Oracle Home - Runtime (i.e. $OHRDBMS env var) -###### -ora.dbhome = /oracle/{{ sap_swpm_db_sid }}/122 -storageBasedCopy.ora.clientVersion = 122 -storageBasedCopy.ora.serverVersion = 122 -{% endif %} -{% if 'db_config_anydb_oracledb_19' in sap_swpm_inifile_list %} - -###### -# db_config_anydb_oracledb_19 -# Use path to Oracle Home - Runtime (i.e. $OHRDBMS env var) -###### -ora.dbhome = /oracle/{{ sap_swpm_db_sid }}/19 -storageBasedCopy.ora.clientVersion = 19 -storageBasedCopy.ora.serverVersion = 19 -{% endif %} -{% if 'db_config_anydb_sapase' in sap_swpm_inifile_list %} - -###### -# db_config_anydb_sapase -###### -NW_ABAP_Import_Dialog.migmonJobNum = 3 -NW_ABAP_Import_Dialog.migmonLoadArgs = -c 100000 -loadprocedure fast -NW_SYB_DBPostload.numberParallelStatisticJobs = 0 -SYB.NW_DB.aseSortOrder = binaryalt -SYB.NW_DB.databaseDevices = data device for SAP,/sybase/{{ sap_swpm_sid | upper }}/sapdata_1,88,,,{{ sap_swpm_sid | upper }}_data_001,log device for SAP,/sybase/{{ sap_swpm_sid | upper }}/saplog_1,10,,,{{ sap_swpm_sid | upper }}_log_001,data device for saptools,/sybase/{{ sap_swpm_sid | upper }}/sapdiag,2,,,saptools_data_001,log device for saptools,/sybase/{{ sap_swpm_sid | upper }}/sapdiag,2,,,saptools_log_001,data device for sybsecurity,/sybase/{{ sap_swpm_sid | upper }}/sybsecurity,1,,,sybsecurity_data_001,data device for sybsecurity,/sybase/{{ sap_swpm_sid | upper }}/sybsecurity,1,,,sybsecurity_data_002,log device for sybsecurity,/sybase/{{ sap_swpm_sid | upper }}/sybsecurity,0.5,,,sybsecurity_log_001,temp device for SAP,/sybase/{{ sap_swpm_sid | upper }}/saptemp,8,,,saptempdb_data_001, -SYB.NW_DB.databaseType = ase -SYB.NW_DB.enableGranularPermissions = true -SYB.NW_DB.enableStrongCipherSuitesForSSL = false -SYB.NW_DB.folderDatabaseSoftware = /sybase/{{ sap_swpm_sid | upper }} -SYB.NW_DB.folderDiagDevice = /sybase/{{ sap_swpm_sid | upper }}/sapdiag -SYB.NW_DB.folderSAPTempdbDevice = /sybase/{{ sap_swpm_sid | upper }}/saptemp -SYB.NW_DB.folderSecurityDevices = /sybase/{{ sap_swpm_sid | upper }}/sybsecurity -SYB.NW_DB.folderSystemDevices = /sybase/{{ sap_swpm_sid | upper }}/sybsystem -SYB.NW_DB.folderTempdbDevice = /sybase/{{ sap_swpm_sid | upper }}/sybtemp -SYB.NW_DB.indexConsumers = 3 -SYB.NW_DB.initializeDefaultSystemEncryptionPassword = false -SYB.NW_DB.maxIndexParallelDegree = 10 -SYB.NW_DB.maxQueryParallelDegree = 10 -SYB.NW_DB.numberWorkerProcesses = 50 -SYB.NW_DB.sqlServerConnections = 200 -SYB.NW_DB.sqlServerHostname = {{ sap_swpm_db_host }} -SYB.NW_DB.sybmgmtdbDataDeviceFolder = /sybase/{{ sap_swpm_sid | upper }}/sybsystem -SYB.NW_DB.sybmgmtdbLogDeviceFolder = /sybase/{{ sap_swpm_sid | upper }}/sybsystem -SYB.NW_DB.userstore_hostname = {{ sap_swpm_ascs_instance_hostname }} - -# To avoid conflicts, leave all Ports blank and SAP SWPM will auto-assign -# Ports by default are in order 4901, 4902, 4903, 4904. For each new ASE DB Server instance on the host, each port number is incremented by 4 -SYB.NW_DB.portDatabaseServer = -SYB.NW_DB.portBackupServer = -SYB.NW_DB.portJobScheduler = -SYB.NW_DB.portXPServer = -{% endif %} -{% if 'db_config_anydb_sapmaxdb' in sap_swpm_inifile_list %} - -###### -# db_config_anydb_sapmaxdb -###### -NW_ABAP_Import_Dialog.migmonJobNum = 90 -NW_ABAP_Import_Dialog.migmonLoadArgs = -para_cnt 90 -NW_ADA_getDBInfo.dbsid = {{ sap_swpm_db_sid }} -SdbInstanceDialogs.DB_sessions = 100 -SdbInstanceDialogs.minlogsize = 4000 -SdbInstanceDialogs.sapdataFolder = sapdata -SdbInstanceDialogs.saplogFolder = saplog -{% endif %} -{% if 'db_connection_nw_hana' in sap_swpm_inifile_list %} - -###### -# db_connection_nw_hana -###### -NW_HDB_getDBInfo.dbhost = {{ sap_swpm_db_host }} -NW_HDB_getDBInfo.dbsid = {{ sap_swpm_db_sid }} -NW_HDB_getDBInfo.instanceNumber = {{ sap_swpm_db_instance_nr }} -NW_HDB_getDBInfo.systemid = {{ sap_swpm_db_sid }} -NW_HDB_getDBInfo.systemPassword = {{ sap_swpm_db_system_password }} -# NW_HDB_getDBInfo.systemDbSid = SystemDB -NW_HDB_getDBInfo.systemDbPassword = {{ sap_swpm_db_systemdb_password }} -NW_HDB_DB.abapSchemaName = {{ sap_swpm_db_schema_abap }} -NW_HDB_DB.abapSchemaPassword = {{ sap_swpm_db_schema_abap_password }} -NW_HDB_DB.javaSchemaName = {{ sap_swpm_db_schema_java }} -NW_HDB_DB.javaSchemaPassword = {{ sap_swpm_db_schema_java_password }} -NW_Recovery_Install_HDB.extractLocation = /usr/sap/{{ sap_swpm_db_sid }}/HDB{{ sap_swpm_db_instance_nr }}/backup/data/DB_HDB -NW_Recovery_Install_HDB.extractParallelJobs = {{ sap_swpm_parallel_jobs_nr }} -NW_Recovery_Install_HDB.sidAdmName = {{ sap_swpm_db_sid | lower }}adm -NW_Recovery_Install_HDB.sidAdmPassword = {{ sap_swpm_db_sidadm_password }} -# NW_HDB_getDBInfo.dbadmin = SYSTEM -# NW_HDB_getDBInfo.tenantOsGroup = {{ sap_swpm_db_sid | lower }}grp -# NW_HDB_getDBInfo.tenantOsUser = {{ sap_swpm_db_sid | lower }}usr -# NW_HDB_getDBInfo.tenantPort = -{% endif %} -{% if 'db_connection_nw_anydb_ibmdb2' in sap_swpm_inifile_list %} - -###### -# db_connection_nw_anydb_ibmdb2 -###### -# db6.UseDb2SSLClientServerComm = false -nwUsers.db6.sapsidPassword = {{ sap_swpm_sapadm_password }} -# nwUsers.db6.sapsidUid = - -# nwUsers.db6.sapsiddbPassword = -# nwUsers.db6.sapsiddbUid = - -# Database Schema and Database Connect User for ABAP (default is sap and not sap) -NW_DB6_DB.db6.abap.connect.user = sap{{ sap_swpm_sid | lower }} -NW_DB6_DB.db6.abap.schema = sap{{ sap_swpm_sid | lower }} -# NW_DB6_DB.db6.java.connect.user = -# NW_DB6_DB.db6.java.schema = -{% endif %} -{% if 'db_connection_nw_anydb_oracledb' in sap_swpm_inifile_list %} - -###### -# db_connection_nw_anydb_oracledb -###### -storageBasedCopy.abapSchemaPassword = {{ sap_swpm_db_schema_abap_password }} -storageBasedCopy.javaSchemaPassword = {{ sap_swpm_db_schema_java_password }} -{% endif %} -{% if 'db_connection_nw_anydb_sapase' in sap_swpm_inifile_list %} - -###### -# db_connection_nw_anydb_sapase -###### -# NW_SYB_CIABAP.sapsaPassword = -{% endif %} -{% if 'db_restore_hana' in sap_swpm_inifile_list %} - -###### -# db_restore_hana -###### -NW_HDB_getDBInfo.systemPasswordBackup = {{ sap_swpm_backup_system_password }} -HDB_Recovery_Dialogs.backupLocation = {{ sap_swpm_backup_location }} -HDB_Recovery_Dialogs.backupName = {{ sap_swpm_backup_prefix }} -HDB_Recovery_Dialogs.sapControlWsdlUrl = http://{{ sap_swpm_db_host }}:5{{ sap_swpm_db_instance_nr }}13/SAPControl?wsdl -HDB_Recovery_Dialogs.sidAdmName = {{ sap_swpm_db_sid | lower }}adm -HDB_Recovery_Dialogs.sidAdmPassword = {{ sap_swpm_db_sidadm_password }} -# HDB_Recovery_Dialogs.backupDestinationType = File -# HDB_Recovery_Dialogs.licenseFile = -# HDB_Recovery_Dialogs.skipExistenceCheck = false -# HDB_Recovery_Dialogs.sourceDatabaseSid = -# HDB_Recovery_Dialogs.useLicenseFile = false -# NW_Recovery_Install_HDB.checkIntegrity = false -# NW_Recovery_Install_HDB.backupLocationHANA = -# NW_Recovery_Install_HDB.backupLocationSAP = -# NW_Recovery_Install_HDB.loadOrMount = load -# HDB_System_Check_Dialogs.initTopology = false -# NW_CreateDBandLoad.movePVCforUsagePiAndDi = -{% endif %} -{% if 'nw_config_anydb' in sap_swpm_inifile_list %} - -###### -# nw_config_anydb -###### -# Distributed installation or system copy with any database and SAP Basis release 740 or higher: -# Execute ABAP program 'RUTPOADAPT' for depooling. Set it to 'true' if declustering / depooling is selected for the distributed database instance installation option -NW_CI_Instance_ABAP_Reports.executeReportsForDepooling = false -{% endif %} -{% if 'nw_config_other' in sap_swpm_inifile_list %} - -###### -# nw_config_other -###### -# NW_Delete_Sapinst_Users.removeUsers = false -NW_getFQDN.FQDN = {{ sap_swpm_fqdn }} -NW_getFQDN.setFQDN = {{ sap_swpm_set_fqdn | lower }} -# NW_getFQDN.resolve = true -NW_GetSidNoProfiles.sid = {{ sap_swpm_sid }} -# NW_GetSidNoProfiles.sapmnt = /sapmnt -# NW_GetSidNoProfiles.strictSidCheck = true -# NW_GetSidNoProfiles.unicode = true -NW_readProfileDir.profileDir = /sapmnt/{{ sap_swpm_sid | upper }}/profile -# NW_readProfileDir.profilesAvailable = -NW_getLoadType.loadType = {{ sap_swpm_load_type }} -# NW_getUnicode.isUnicode = -# MessageServer.configureAclInfo = false -# NW_Exit_Before_Systemstart.exit = false -# NW_adaptProfile.skipSecurityProfileSettings = false -# OS4.DestinationASP = -{% endif %} -{% if 'nw_config_central_services_abap' in sap_swpm_inifile_list %} - -###### -# nw_config_central_services_abap -# Central Services (ASCS) contains the Message server (MS) and Enqueue work processes (EN) for the ABAP Dispatcher. -# Formerly the processes were contained in the Central Instance (CI). -###### -NW_CI_Instance.ascsVirtualHostname = {{ sap_swpm_ascs_instance_hostname }} -NW_CI_Instance.ascsInstanceNumber = {{ sap_swpm_ascs_instance_nr }} -# NW_SCS_Instance.ascsVirtualHostname = {{ sap_swpm_ascs_instance_hostname }} -NW_SCS_Instance.ascsInstanceNumber = {{ sap_swpm_ascs_instance_nr }} -{% endif %} -{% if 'nw_config_central_services_java' in sap_swpm_inifile_list %} - -###### -# nw_config_central_services_java -# SAP Java Central Services Instance (SCS) contains the Java Message server (MS), Java Enqueue server (EN), Java Gateway (GW) and Java Internal Web Dispatcher (WD). -###### -NW_CI_Instance.scsVirtualHostname = {{ sap_swpm_java_scs_instance_hostname }} -NW_CI_Instance.scsInstanceNumber = {{ sap_swpm_java_scs_instance_nr }} -NW_SCS_Instance.scsVirtualHostname = {{ sap_swpm_java_scs_instance_hostname }} -# NW_SCS_Instance.scsInstanceNumber = -NW_SCS_Instance.instanceNumber = {{ sap_swpm_java_scs_instance_nr }} -NW_JAVA_Export.keyPhrase = {{ sap_swpm_master_password }} -{% endif %} -{% if 'nw_config_primary_application_server_instance' in sap_swpm_inifile_list %} - -###### -# nw_config_primary_application_server_instance -# Primary Application Server (PAS) contains the Internet Communication Manager (ICM), Gateway (GW), and ABAP Dispatcher (DI/WP) work processes. -# Formerly called the Central Instance (CI). -###### -NW_CI_Instance.ciVirtualHostname = {{ sap_swpm_pas_instance_hostname }} -NW_CI_Instance.ciInstanceNumber = {{ sap_swpm_pas_instance_nr }} -# NW_CI_Instance.nodesNum = -# NW_CI_Instance.nodesNumber = defNodes -# NW_WPConfiguration.ciBtcWPNumber = 6 -# NW_WPConfiguration.ciDialogWPNumber = 10 -{% endif %} -{% if 'nw_config_additional_application_server_instance' in sap_swpm_inifile_list %} - -###### -# nw_config_additional_application_server_instance -# Additional Application Server (AAS) contains ABAP Dispatcher (DI/WP) work processes. -# Formerly called the Dialog Instance (DI). -###### -# Instance number of SAP NetWeaver Application Server. Leave empty for default. -NW_AS.instanceNumber = {{ sap_swpm_aas_instance_nr }} - -# Do not skip unpacking archives if adding the SAP NetWeaver Application Server to another operating system / host. Default is 'false'. -# NW_AS.skipUnpacking = false - -# Start the SAP NetWeaver Application Server at the end of the installation. Default is 'true'. -# NW_AS.start = true - -# Virtual host name of the SAP NetWeaver Application Server instance. Leave empty to use the existing host name -NW_DI_Instance.virtualHostname = {{ sap_swpm_aas_instance_hostname }} -{% endif %} -{% if 'nw_config_ers' in sap_swpm_inifile_list %} - -###### -# nw_config_ers -###### -nw_instance_ers.ersVirtualHostname = {{ sap_swpm_ers_instance_hostname }} -nw_instance_ers.ersInstanceNumber = {{ sap_swpm_ers_instance_nr }} - -# Disable 'Automatic Instance and Service Restart' for SAP SWPM Unattended Mode, -# otherwise by default SAP SWPM will use sapcontrol -queryuser -function Stop and will cause error -# "User? Password? Stop. FAIL: Invalid Credentials" -nw_instance_ers.restartSCS = false -{% endif %} -{% if 'nw_config_ports' in sap_swpm_inifile_list %} - -###### -# nw_config_ports -###### -NW_CI_Instance.ciMSPort = 36{{ sap_swpm_ascs_instance_nr }} -NW_checkMsgServer.abapMSPort = 36{{ sap_swpm_ascs_instance_nr }} -# NW_CI_Instance.ciMSPortInternal = -# NW_CI_Instance.createGlobalProxyInfoFile = false -# NW_CI_Instance.createGlobalRegInfoFile = false -# NW_CI_Instance.scsMSPortInternal = -# NW_SCS_Instance.scsMSPort = -# NW_SCS_Instance.createGlobalProxyInfoFile = false -# NW_SCS_Instance.createGlobalRegInfoFile = false -{% endif %} -{% if 'nw_config_java_ume' in sap_swpm_inifile_list %} - -###### -# nw_config_java_ume -###### -UmeConfiguration.adminName = J2EE_ADM_{{ sap_swpm_sid }} -UmeConfiguration.adminPassword = {{ sap_swpm_ume_j2ee_admin_password }} -UmeConfiguration.guestName = J2EE_GST_{{ sap_swpm_sid }} -UmeConfiguration.sapjsfPassword = {{ sap_swpm_ume_sapjsf_password }} -UmeConfiguration.umeClient = {{ sap_swpm_ume_client_nr }} -UmeConfiguration.umeHost = {{ sap_swpm_pas_instance_hostname }} -UmeConfiguration.umeInstance = {{ sap_swpm_ume_instance_nr }} -UmeConfiguration.umeType = {{ sap_swpm_ume_type }} -# UmeConfiguration.sapjsfName = SAPJSF -{% endif %} -{% if 'nw_config_java_feature_template_ids' in sap_swpm_inifile_list %} - -###### -# nw_config_java_feature_template_ids -###### -NW_internal.useProductVersionDescriptor = true -nw_java_import.buildJEEusingExtraMileTool = {{ true if sap_swpm_java_import_method == 'extramile' else false }} - -# If use PV = true -# SAP SWPM 1.0 for SAP NetWeaver AS (JAVA), Product Version Software Instance **Feature Template IDs** comma-separated list -Select_PPMS_Instances.ListOfSelectedInstances = {% set selected_ids = [] %}{%- for item_selected in sap_swpm_java_template_id_selected_list %} -{%- if item_selected in sap_swpm_java_template_id_lookup_dictionary -%} -{{ selected_ids.append(sap_swpm_java_template_id_lookup_dictionary[item_selected]) }} -{%- endif %} -{%- endfor %}{{ selected_ids | flatten | join(',') }} - -## If use PV = false [LEGACY for before NWAS JAVA 7.40] -## Comma-separated value list containing which product instances (formerly known as usage types) are installed. Used for handling product instances in unattended mode. -## SAP_Software_Features_Select.selectedInstancesForInstallation = AS,AAS,BASIC,NW-MODEL,ESR,PI,PI-AF -{%- endif %} -{% if 'nw_config_webdisp_generic' in sap_swpm_inifile_list %} - -###### -# nw_config_webdisp_generic -###### -NW_Webdispatcher_Instance.wdInstanceNumber = {{ sap_swpm_wd_instance_nr }} -# NW_webdispatcher_Instance.encryptionMode = Always -# NW_webdispatcher_Instance.useWdHTTPPort = false -NW_webdispatcher_Instance.wdHTTPPort = 80{{ sap_swpm_wd_instance_nr }} -NW_webdispatcher_Instance.wdHTTPSPort = 443{{ sap_swpm_wd_instance_nr }} -NW_webdispatcher_Instance.wdVirtualHostname = {{ sap_swpm_wd_virtual_host }} - -NW_Webdispatcher_Instance.configureSystemConnectivity = {{ sap_swpm_wd_system_connectivity | lower }} -NW_webdispatcher_Instance.backEndSID = {{ sap_swpm_wd_backend_sid }} -NW_webdispatcher_Instance.msHTTPPort = {{ sap_swpm_wd_backend_ms_http_port }} -NW_webdispatcher_Instance.msHost = {{ sap_swpm_wd_backend_ms_host }} -NW_webdispatcher_Instance.scenarioSize = {{ sap_swpm_wd_backend_scenario_size }} - -NW_webdispatcher_Instance.activateICF = {{ sap_swpm_wd_activate_icf | lower }} -NW_webdispatcher_Instance.rfcHost = {{ sap_swpm_wd_backend_rfc_host }} -NW_webdispatcher_Instance.rfcInstance = {{ sap_swpm_wd_backend_rfc_instance_nr }} -NW_webdispatcher_Instance.rfcClient = {{ sap_swpm_wd_backend_rfc_client_nr }} -NW_webdispatcher_Instance.rfcUser = {{ sap_swpm_wd_backend_rfc_user }} -NW_webdispatcher_Instance.rfcPassword = {{ sap_swpm_wd_backend_rfc_user_password }} -{% endif %} -{% if 'nw_config_webdisp_gateway' in sap_swpm_inifile_list %} - -###### -# nw_config_webdisp_gateway -# -# It is recommended to install gateway as part of ASCS -# It is NOT recommended to install webdispatcher as part of ASCS. A separate Web Dispatcher instance should be installed (SAP Note 908097) -###### -NW_CI_Instance.ascsInstallGateway = {{ sap_swpm_ascs_install_gateway | lower }} -# NW_SCS_Instance.ascsInstallGateway = {{ sap_swpm_ascs_install_gateway | lower }} - -# Embedded SAP Web Dispatcher -# NW_CI_Instance.ascsInstallWebDispatcher = false -# NW_SCS_Instance.ascsInstallWebDispatcher = false -{% endif %} -{% if 'nw_config_host_agent' in sap_swpm_inifile_list %} - -###### -# nw_config_host_agent -###### -NW_System.installSAPHostAgent = {{ sap_swpm_install_saphostagent | lower }} -{% endif %} -{% if 'nw_config_post_load_abap_reports' in sap_swpm_inifile_list %} - -###### -# nw_config_post_load_abap_reports -###### -# Activate ICF node '/SAP/BC/REST/SLPROTOCOL' -NW_CI_Instance_ABAP_Reports.enableActivateICFService = true - -# SAP INTERNAL USE ONLY -# NW_CI_Instance_ABAP_Reports.enableSPAMUpdateWithoutStackXml = false - -# SAP INTERNAL USE ONLY -# NW_CI_Instance_ABAP_Reports.enableTMSConfigWithoutStackXml = false - -# SAP INTERNAL USE ONLY -# NW_CI_Instance_ABAP_Reports.enableTransportsWithoutStackXml = false - -# Need specific new password of the DDIC user in client 000, different from Master Password -# NW_CI_Instance_ABAP_Reports.needNewDDIC000Password = false - -# Need specific new password of the DDIC user in client 001, different from Master Password -# NW_CI_Instance_ABAP_Reports.needNewDDIC001Password = false - -# Need specific new password of the SAP* user in client 000, different from Master Password -# NW_CI_Instance_ABAP_Reports.needNewSapStar000Password = false - -# Need specific new password of the SAP* user in client 001, different from Master Password -# NW_CI_Instance_ABAP_Reports.needNewSapStar001Password = false - -# Specify new password of the DDIC user in client 000, different from Master Password -# NW_CI_Instance_ABAP_Reports.ddic000Password = - -# Specify new password of the DDIC user in client 001, different from Master Password -# NW_CI_Instance_ABAP_Reports.ddic001Password = - -# Specify new password of the SAP* user in client 000, different from Master Password -# NW_CI_Instance_ABAP_Reports.sapStar000Password = - -# Specify new password of the SAP* user in client 001, different from Master Password -# NW_CI_Instance_ABAP_Reports.sapStar001Password = -{% endif %} -{% if 'nw_config_livecache' in sap_swpm_inifile_list %} - -###### -# nw_config_livecache -###### -NW_liveCache.controlUserPwd = -NW_liveCache.liveCacheHost = -NW_liveCache.liveCacheID = -NW_liveCache.liveCacheUser = -NW_liveCache.liveCacheUserPwd = -NW_liveCache.useLiveCache = -{% endif %} -{% if 'nw_config_sld' in sap_swpm_inifile_list %} - -###### -# nw_config_sld -###### -NW_SLD_Configuration.configureSld = -NW_SLD_Configuration.sldHost = -NW_SLD_Configuration.sldPort = -NW_SLD_Configuration.sldUseHttps = -NW_SLD_Configuration.sldUser = -NW_SLD_Configuration.sldUserPassword = -{% endif %} -{% if 'nw_config_abap_language_packages' in sap_swpm_inifile_list %} - -###### -# nw_config_abap_language_packages -###### -NW_Language_Inst_Dialogs.install = true -# Path to language archive files (e.g. S4HANAOP***_LANG_EN.SAR) -NW_Language_Inst_Dialogs.folders = /software -# Selected languages comma-separated list (by default DE,EN are installed) -NW_Language_Inst_Dialogs.languages = AR,BG,CA,CS,DA,EL,ES,ET,FI,FR,HE,HI,HR,HU,IT,JA,KK,KO,LT,LV,MS,NL,NO,PL,PT,RO,RU,SH,SK,SL,SV,TH,TR,UK,VI,ZF,ZH -{% endif %} -{% if 'sap_os_linux_user' in sap_swpm_inifile_list %} - -###### -# sap_os_linux_user -###### -nwUsers.sapadmUID = {{ sap_swpm_sapadm_uid }} -nwUsers.sapsysGID = {{ sap_swpm_sapsys_gid }} -nwUsers.sidAdmUID = {{ sap_swpm_sidadm_uid }} -{% endif %} -{% if 'swpm_installation_media_download_service' in sap_swpm_inifile_list %} - -###### -# swpm_installation_media_download_service -# Not in use by sap_swpm Ansible Role -###### -# nwUsers.sapServiceSIDPassword = -# download_service.directory = -# DownloadService.EnableProxy = -# DownloadService.HostName = -# DownloadService.Password = -# DownloadService.Port = -# DownloadService.ProvideAuthentication = -# DownloadService.Username = -# DownloadService.planNumber = -{% endif %} -{% if 'nw_config_java_icm_credentials' in sap_swpm_inifile_list %} - -###### -# nw_config_java_icm_credentials -###### -NW_IcmAuth.webadmPassword = {{ sap_swpm_ume_j2ee_admin_password }} -{% endif %} -{% if 'solman_abap_swpm1' in sap_swpm_inifile_list %} - -###### -# solman_abap_swpm1 -# Not in use by sap_swpm Ansible Role -###### -InitDeclusteringForImport.decluster = false -{% endif %} -{% if 'solman_daa_swpm1' in sap_swpm_inifile_list %} - -###### -# solman_daa_swpm1 -# Not in use by sap_swpm Ansible Role -###### -# DiagnosticsAgent.dasidAdmPassword = {{ sap_swpm_diagnostics_agent_password }} -# DiagnosticsAgent.installSAPHostAgent -# DiagnosticsAgent.InstanceNumber -# DiagnosticsAgent.LogicalHostName -# DiagnosticsAgent.SAPJVMVersion -# DiagnosticsAgent.SAProuter.Password -# DiagnosticsAgent.SAProuter.RouteString -# DiagnosticsAgent.SID -# DiagnosticsAgent.SLD.Connection -# DiagnosticsAgent.SLD.HostName -# DiagnosticsAgent.SLD.Password -# DiagnosticsAgent.SLD.PortNumber -# DiagnosticsAgent.SLD.UseHTTPS -# DiagnosticsAgent.SLD.UserName -# DiagnosticsAgent.SolMan.Connection -# DiagnosticsAgent.SolMan.HostName -# DiagnosticsAgent.SolMan.Password -# DiagnosticsAgent.SolMan.PortNumber -# DiagnosticsAgent.SolMan.UserName -# DiagnosticsAgent.SolMan.UseSSL -{% endif %} -{% if 'syscopy_export_anydb' in sap_swpm_inifile_list %} - -###### -# syscopy_export_anydb -# Not in use by sap_swpm Ansible Role -###### -# InitDeclusteringForExport.decluster = -# NW_ABAP_Export_Dialog.customPackageOrder = -# NW_ABAP_Export_Dialog.customSortOrderFile = -# NW_ABAP_Export_Dialog.exportTimeFile = -# NW_ABAP_Export_Dialog.importTimeFile = -# NW_ABAP_Export_Dialog.jobNumberGroupLarge = 7 -# NW_ABAP_Export_Dialog.jobNumberGroupSmall = 4 -# NW_ABAP_Export_Dialog.migmonComHost = -# NW_ABAP_Export_Dialog.migmonComPort = -# NW_ABAP_Export_Dialog.migmonComType = EXCHANGE -# NW_ABAP_Export_Dialog.migmonDataTransferType = NET -# NW_ABAP_Export_Dialog.migmonFtpExchangeDir = -# NW_ABAP_Export_Dialog.migmonFtpExportDir = -# NW_ABAP_Export_Dialog.migmonFtpHost = -# NW_ABAP_Export_Dialog.migmonFtpPassword = -# NW_ABAP_Export_Dialog.migmonFtpUser = -NW_ABAP_Export_Dialog.migmonJobNum = 3 -NW_ABAP_Export_Dialog.migmonLoadArgs = -stop_on_error -# NW_ABAP_Export_Dialog.migmonNetExchangeDir = -# NW_ABAP_Export_Dialog.migmonTaskArgs = -# NW_ABAP_Export_Dialog.nonStandardAbapObjectsHandlingSkip = false -NW_ABAP_Export_Dialog.parallelR3szchkExecution = true -NW_ABAP_Export_Dialog.r3szchkDetermineSizeValue = DB -# NW_ABAP_Export_Dialog.r3szchkJobNum = 10 -NW_ABAP_Export_Dialog.repeatExport = COMPLETE -NW_ABAP_Export_Dialog.splitPackageLimitVal = 5000 -# NW_ABAP_Export_Dialog.splitMaxTableNumVal = 1000 -# NW_ABAP_Export_Dialog.splitTableFile = -# NW_ABAP_Export_Dialog.splitTableLimitVal = 300 -# NW_ABAP_Export_Dialog.splitTableNumVal = 10 -# NW_ABAP_Export_Dialog.splitUseMaxTableNum = false -# NW_ABAP_Export_Dialog.splitUsePackageLimit = true -# NW_ABAP_Export_Dialog.splitUseTableFile = false -# NW_ABAP_Export_Dialog.splitUseTableLimit = false -# NW_ABAP_Export_Dialog.splitUseTableNum = true -# NW_ABAP_Export_Dialog.sqlFileDir = -NW_ABAP_Export_Dialog.targetHardwarePlatform = LITTLE_ENDIAN - -## Target database types for Linux are ADA, HDB, DB6, ORA, SYB -NW_ABAP_Export_Dialog.targetDbType = {{ sap_swpm_export_target_db_type }} - -# NW_ABAP_Export_Dialog.useAdditionalExportHosts = false -# NW_ABAP_Export_Dialog.useAdvancedUnloadConfig = false -# NW_ABAP_Export_Dialog.useCustomPackageOrder = false -# NW_ABAP_Export_Dialog.useCustomSortOrder = false -# NW_ABAP_Export_Dialog.useMigMonConfig = false -# NW_ABAP_Export_Dialog.useParallelExportImport = false -# NW_ABAP_Export_Dialog.useSplit = true -NW_ABAP_Export_Dialog.useSqlFiles = NOSQL -# NW_ABAP_Export_Dialog.useUnicodeTargetSystem = -NW_ABAP_Export_Dialog.useUnsortedUnload = true - -NW_Export.accessLevel4ExportDir = DEFAULT -NW_Export.choiceSepKernel = false -NW_Export.mainExportDir = {{ sap_swpm_export_files_path }} - -# Do not stop SAP System before data is unloaded -# SAP SWPM is unable to automatically stop the SAP System (i.e. DB, ASCS, PAS instances), -# if stop is true then SAP SWPM Unattended will fail on step mainExportParameters -NW_Export.stopRunningSystem = true - -NW_readProfileDir.profileDir = /sapmnt/{{ sap_swpm_sid | upper }}/profile - -NW_getLoadType.loadType = {{ sap_swpm_load_type }} -NW_getLoadType.importManuallyExecuted = false -{% endif %} -{% if 'syscopy_import_anydb_ibmdb2' in sap_swpm_inifile_list %} - -###### -# syscopy_import_anydb_ibmdb2 -# Not in use by sap_swpm Ansible Role -###### -# db6.Additional_DbServer = -# db6.cluster.HADRPort1 = -# db6.cluster.HADRPort2 = -# db6.cluster.SyncMode = -# db6.ConfigureCluster = false -# db6.DropSchemaList = -# db6.InstallPureScale = false -# db6.InstallTSA = false -# db6.minimizeDatabaseSizeCompression = -# db6.minimizeDatabaseSizeCompressionJava = -# db6.minimizeDatabaseSizeDeferredTable = true -# db6.notuseMcod = -# db6.NumAdditionalPartitions = -# db6.useDB2ControlFiles = false -# db6.UseDb2NativeEncryption = false -# NW_adaptProfile.templateFiles = -# NW_CreateDBandLoad.movePVCforUsagePiAndDi = -db6.allowUnsignedDatabaseSoftware = true -db6.cluster.ClusterType = HADR (High Availability Disaster Recovery) -db6.usingSystemCopyBRforHADR = true -NW_getDBInfoGeneric.dbhost = {{ sap_swpm_db_host }} -NW_getDBInfoGeneric.dbsid = {{ sap_swpm_db_sid }} -NW_getLoadType.loadType = {{ sap_swpm_load_type }} -NW_getLoadType.importManuallyExecuted = false -NW_getUnicode.isUnicode = true -# NW_getDBInfoGeneric.strictDbSidCheck = true -storageBasedCopy.db6.CommunicationPortNumber = 5912 -storageBasedCopy.db6.PortRangeEnd = 5917 -storageBasedCopy.db6.PortRangeStart = 5914 -# storageBasedCopy.db6.db6updatedbpath = -{% endif %} diff --git a/roles/sap_swpm/templates/inifile_params.j2 b/roles/sap_swpm/templates/inifile_params.j2 new file mode 100644 index 000000000..56da03da8 --- /dev/null +++ b/roles/sap_swpm/templates/inifile_params.j2 @@ -0,0 +1,1158 @@ +### inifile.params generated for SWPM - Product ID is {{ sap_swpm_product_catalog_id }} + +{% if 'swpm_installation_media' in sap_swpm_inifile_sections_list %} +################################################################### +# BEGIN section swpm_installation_media # +# # +archives.downloadBasket = {{ sap_swpm_software_path }} + +# installation_export.archivesFolder = {{ sap_swpm_cd_export_path }} + +# NOTE: Specific media requirements will use format +# SAPINST.CD.PACKAGE. = +# # +# END section swpm_installation_media # +################################################################### +{% endif %} +{% if 'swpm_installation_media_swpm2_hana' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section swpm_installation_media_swpm2_hana # +# # +HDB_Software_Dialogs.useMediaCD = {{ sap_swpm_software_use_media }} +# # +# END section swpm_installation_media_swpm2_hana # +################################################################### +{% endif %} +{% if 'swpm_installation_media_swpm1' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section swpm_installation_media_swpm1 # +# # +SAPINST.CD.PACKAGE.LANGUAGE = {{ sap_swpm_cd_language_path }} +SAPINST.CD.PACKAGE.JAVA = {{ sap_swpm_cd_java_path }} +SAPINST.CD.PACKAGE.RDBMS = {{ sap_swpm_cd_rdbms_path }} +# SAPINST.CD.PACKAGE.KERNEL = +# SAPINST.CD.PACKAGE.KERNEL2 = +# SAPINST.CD.PACKAGE.KERNEL3 = + +# SAPINST.CD.PACKAGE.JAVA_EXPORT = /path/JAVA_EXPORT +# SAPINST.CD.PACKAGE.JDMP = /path/JAVA_EXPORT_JDMP +# SAPINST.CD.PACKAGE.J2EE = /path/JAVA_J2EE_OSINDEP +# SAPINST.CD.PACKAGE.J2EE-INST = /path/JAVA_J2EE_OSINDEP_J2EE_INST +# SAPINST.CD.PACKAGE.SCA = /path/JAVA_J2EE_OSINDEP_UT +# # +# END section swpm_installation_media_swpm1 # +################################################################### +{% endif %} +{% if 'swpm_installation_media_swpm1_exportfiles' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section swpm_installation_media_swpm1_exportfiles # +# # +SAPINST.CD.PACKAGE.EXPORT = {{ sap_swpm_cd_export_path }} +# SAPINST.CD.PACKAGE.LOAD = +SAPINST.CD.PACKAGE.LOAD1 = {{ sap_swpm_cd_export_pt1_path }} +SAPINST.CD.PACKAGE.LOAD2 = {{ sap_swpm_cd_export_pt2_path }} +# SAPINST.CD.PACKAGE.JMIG = +# # +# END section swpm_installation_media_swpm1_exportfiles # +################################################################### +{% endif %} +{% if 'swpm_installation_media_swpm1_ibmdb2' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section swpm_installation_media_swpm1_ibmdb2 # +# # +# Requested package : RDBMS-DB6 +SAPINST.CD.PACKAGE.DB2 = {{ sap_swpm_cd_ibmdb2_path }} + +# Requested package : RDBMS-DB6 CLIENT +SAPINST.CD.PACKAGE.DB2CLIENT = {{ sap_swpm_cd_ibmdb2_client_path }} + +# IBM DB2 software unpack path e.g. /db2/db2x01/db2_software +db6.DB2SoftwarePath = {{ sap_swpm_ibmdb2_unpack_path }} +# # +# END section swpm_installation_media_swpm1_ibmdb2 # +################################################################### +{% endif %} +{% if 'swpm_installation_media_swpm1_oracledb_121' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section swpm_installation_media_swpm1_oracledb_121 # +# # +# Requested package : RDBMS-ORA +SAPINST.CD.PACKAGE.RDBMS-ORA121 = {{ sap_swpm_cd_oracle_path }} + +# Requested package : RDBMS-ORA CLIENT +SAPINST.CD.PACKAGE.ORACLI121 = {{ sap_swpm_cd_oracle_client_path }} +# # +# END section swpm_installation_media_swpm1_oracledb_121 # +################################################################### +{% endif %} +{% if 'swpm_installation_media_swpm1_oracledb_122' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section swpm_installation_media_swpm1_oracledb_122 # +# # +# Requested package : RDBMS-ORA +SAPINST.CD.PACKAGE.RDBMS-ORA122 = {{ sap_swpm_cd_oracle_path }} + +# Requested package : RDBMS-ORA CLIENT +SAPINST.CD.PACKAGE.ORACLI122 = {{ sap_swpm_cd_oracle_client_path }} +# # +# END section swpm_installation_media_swpm1_oracledb_122 # +################################################################### +{% endif %} +{% if 'swpm_installation_media_swpm1_oracledb_19' in sap_swpm_inifile_sections_list %} + +# Requested package : RDBMS-ORA +################################################################### +# BEGIN section swpm_installation_media_swpm1_oracledb_19 # +# # +SAPINST.CD.PACKAGE.RDBMS-ORA19 = {{ sap_swpm_cd_oracle_path }} + +# Requested package : RDBMS-ORA CLIENT +SAPINST.CD.PACKAGE.ORACLI19 = {{ sap_swpm_cd_oracle_client_path }} +# # +# END section swpm_installation_media_swpm1_oracledb_19 # +################################################################### +{% endif %} +{% if 'swpm_installation_media_swpm1_sapase' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section swpm_installation_media_swpm1_sapase # +# # +# Requested package : RDBMS-SYB +SAPINST.CD.PACKAGE.RDBMS-SYB = {{ sap_swpm_cd_sapase_path }} +SAPINST.CD.PACKAGE.RDBMS-SYB-CLIENT = {{ sap_swpm_cd_sapase_client_path }} +# # +# END section swpm_installation_media_swpm1_sapase # +################################################################### +{% endif %} +{% if 'swpm_installation_media_swpm1_sapmaxdb' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section swpm_installation_media_swpm1_sapmaxdb # +# # +# Requested package : RDBMS-ADA +SAPINST.CD.PACKAGE.RDBMS-ADA = {{ sap_swpm_cd_sapmaxdb_path }} +# # +# END section swpm_installation_media_swpm1_sapmaxdb # +################################################################### +{% endif %} +{% if 'maintenance_plan_stack_tms_config' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section maintenance_plan_stack_tms_config # +# # +NW_ABAP_TMSConfig.configureTMS = {{ sap_swpm_configure_tms | lower }} +NW_ABAP_TMSConfig.transportPassword = {{ sap_swpm_tmsadm_password }} +# # +# END section maintenance_plan_stack_tms_config # +################################################################### +{% endif %} +{% if 'maintenance_plan_stack_tms_transports' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section maintenance_plan_stack_tms_transports # +# # +NW_ABAP_Include_Corrections.includeTransports = true +NW_ABAP_Include_Corrections.transportFilesLocations = {{ sap_swpm_tms_tr_files_path }} +# # +# END section maintenance_plan_stack_tms_transports # +################################################################### +{% endif %} +{% if 'maintenance_plan_stack_spam_config' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section maintenance_plan_stack_spam_config # +# # +NW_ABAP_SPAM_Update.SPAMUpdateDecision = {{ sap_swpm_spam_update | lower }} +{% if sap_swpm_spam_update %} +NW_ABAP_SPAM_Update.SPAMUpdateArchive = {{ sap_swpm_spam_update_sar }} +{% else %} +#NW_ABAP_SPAM_Update.SPAMUpdateArchive = +{% endif %} +# # +# END section maintenance_plan_stack_spam_config # +################################################################### +{% endif %} +{% if 'maintenance_plan_stack_sum_config' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section maintenance_plan_stack_sum_config +# # +NW_ABAP_Prepare_SUM.prepareSUM = {{ sap_swpm_sum_prepare | lower }} +NW_ABAP_Prepare_SUM.startSUM = {{ sap_swpm_sum_start | lower }} + +# Password for SUM must be for 'adm' user +NW_ABAP_Prepare_SUM.Password = {{ sap_swpm_sap_sidadm_password }} +# # +# END section maintenance_plan_stack_sum_config +################################################################### +{% endif %} +{% if 'maintenance_plan_stack_sum_10_batch_mode' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section maintenance_plan_stack_sum_10_batch_mode # +# # +# Re-run of existing BatchModeInputFile.xml for NWAS JAVA (generated by SUM 1.0 on previous host into the /sdt/param/ subdirectory) +NW_ABAP_Prepare_SUM.SUMBatchFile = {{ sap_swpm_sum_batch_file }} +# # +# END section maintenance_plan_stack_sum_10_batch_mode # +################################################################### +{% endif %} +{% if 'credentials' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section credentials # +# # +# Master password: +NW_GetMasterPassword.masterPwd = {{ sap_swpm_master_password }} +# 'adm' user: +nwUsers.sidadmPassword = {{ sap_swpm_sap_sidadm_password }} +DiagnosticsAgent.dasidAdmPassword = {{ sap_swpm_diagnostics_agent_password }} +# 'sapadm' user of the SAP Host Agent: +hostAgent.sapAdmPassword = {{ sap_swpm_sapadm_password }} +# # +# END section credentials # +################################################################### +{% endif %} +{% if 'credentials_hana' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section credentials_hana # +# # +HDB_Schema_Check_Dialogs.schemaPassword = {{ sap_swpm_db_schema_password }} +storageBasedCopy.hdb.systemPassword = {{ sap_swpm_db_system_password }} +# # +# END section credentials_hana # +################################################################### +HDB_Schema_Check_Dialogs.schemaPassword = {{ sap_swpm_db_schema_password }} +storageBasedCopy.hdb.systemPassword = {{ sap_swpm_db_system_password }} +{% endif %} +{% if 'credentials_anydb_ibmdb2' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section credentials_anydb_ibmdb2 # +# # +nwUsers.db6.db2sidPassword = {{ sap_swpm_sap_sidadm_password }} +# nwUsers.db6.db2sidUid = +# # +# END section credentials_anydb_ibmdb2 # +################################################################### +{% endif %} +{% if 'credentials_anydb_oracledb' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section credentials_anydb_oracledb # +# # +# Oracle database software owner +ora.oraclePassword = {{ sap_swpm_sap_sidadm_password }} +# 'ora' user +ora.orasidPassword = {{ sap_swpm_sap_sidadm_password }} +# Oracle 'SYS' password +ora.SysPassword = {{ sap_swpm_db_system_password }} +# Oracle 'SYSTEM' password +ora.SystemPassword = {{ sap_swpm_db_system_password }} +# # +# END section credentials_anydb_oracledb # +################################################################### +{% endif %} +{% if 'credentials_anydb_ibmdb2' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section credentials_anydb_ibmdb2 # +# # +nwUsers.db6.db2sidPassword = {{ sap_swpm_sap_sidadm_password }} +# nwUsers.db6.db2sidUid = +# # +# END section credentials_anydb_ibmdb2 # +################################################################### +{% endif %} +{% if 'credentials_anydb_sapase' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section credentials_anydb_sapase # +# # +nwUsers.syb.sybsidPassword = {{ sap_swpm_sap_sidadm_password }} +SYB.NW_DB.sa_pass = {{ sap_swpm_master_password }} +SYB.NW_DB.sapsa_pass = {{ sap_swpm_master_password }} +SYB.NW_DB.sapsr3_pass = {{ sap_swpm_master_password }} +SYB.NW_DB.sapsr3db_pass = {{ sap_swpm_db_system_password }} +# SYB.NW_DB.encryptionMasterKeyPassword = +# SYB.NW_DB.sapsso_pass = +# SYB.NW_DB.sslPassword = +# # +# END section credentials_anydb_sapase # +################################################################### +{% endif %} +{% if 'credentials_anydb_sapmaxdb' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section credentials_anydb_sapmaxdb # +# # +# Note: The password of user DBUser may only consist of alphanumeric characters and the special characters #, $, @ and _ +nwUsers.ada.sqdsidPassword = {{ sap_swpm_sap_sidadm_password }} +Sdb_DBUser.dbaPassword = {{ sap_swpm_db_system_password }} +Sdb_DBUser.dbmPassword = {{ sap_swpm_db_system_password }} +Sdb_Schema_Dialogs.dbSchemaPassword = {{ sap_swpm_db_schema_password }} +# # +# END section credentials_anydb_sapmaxdb # +################################################################### +{% endif %} +{% if 'credentials_nwas_ssfs' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section credentials_nwas_ssfs # +# # +HDB_Userstore.useABAPSSFS = true +# NW_ABAP_SSFS_CustomKey.ssfsKeyInputFile = +# # +# END section credentials_nwas_ssfs # +################################################################### +{% endif %} +{% if 'credentials_hdbuserstore' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section credentials_hdbuserstore # +# # +HDB_Userstore.useABAPSSFS = false +# HDB_Userstore.doNotResolveHostnames = +# HDB_Userstore.HDB_USE_IDENT = +# HDB_Userstore.systemDBPort = +# NW_HDB_DBClient.checkCreateUserstore = true +# NW_HDB_DBClient.clientPathStrategy = LOCAL +# # +# END section credentials_hdbuserstore # +################################################################### +{% endif %} +{% if 'credentials_syscopy' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section credentials_syscopy # +# # +# Are the passwords for the DDIC users different from the default value? +NW_DDIC_Password.needDDICPasswords = true +NW_DDIC_Password.ddic000Password = {{ sap_swpm_ddic_000_password }} +#NW_DDIC_Password.ddic001Password = +# # +# END section credentials_syscopy # +################################################################### +{% endif %} +{% if 'db_config_hana' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section db_config_hana # +# # +storageBasedCopy.hdb.instanceNumber = {{ sap_swpm_db_instance_nr }} +HDB_Schema_Check_Dialogs.schemaName = {{ sap_swpm_db_schema }} +###################################################################### +# BEGIN subsection nw_config_additional_application_server_instance # +# # +{% if 'nw_config_additional_application_server_instance' in sap_swpm_inifile_sections_list %} +HDB_Schema_Check_Dialogs.validateSchemaName = true +{% else %} +HDB_Schema_Check_Dialogs.validateSchemaName = false +# # +# END subsection nw_config_additional_application_server_instance # +###################################################################### +{% endif %} +# HDB_Schema_Check_Dialogs.dropSchema = false +# hdb.create.dbacockpit.user = false +# # +# END section db_config_hana # +################################################################### +{% endif %} +{% if 'db_config_anydb_all' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section db_config_anydb_all # +# # +NW_ABAP_Import_Dialog.dbCodepage = 4103 +# # +# END section db_config_anydb_all # +################################################################### +{% endif %} +{% if 'db_config_anydb_ibmdb2' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section db_config_anydb_ibmdb2 # +# # +NW_ABAP_Import_Dialog.migmonJobNum = 3 +NW_ABAP_Import_Dialog.migmonLoadArgs = -stop_on_error -loadprocedure fast LOAD:COMPRESS_ALL:DEF_CRT +NW_getDBInfoGeneric.dbhost = {{ sap_swpm_db_host }} +NW_getDBInfoGeneric.dbsid = {{ sap_swpm_db_sid }} +NW_getUnicode.isUnicode = true +# db6.useMcod = true +# db6.useBluSettings = false +# db6.gid_sysadm = +# db6.gid_sysctrl = +# db6.gid_sysmaint = +# db6.gid_sysmon = +db6.allowUnsignedDatabaseSoftware = true +db6.cluster.ClusterType = HADR (High Availability Disaster Recovery) +db6.createTablespacesUsingSapinst = true +db6.minimizeDatabaseSizeCompression = true +db6.TablespacePoolSizes = SAPSID#DATA{20} +db6.useAutoStorage = true +db6.useExtraSapdataSaptmpDirLayout = false +db6.UseStandardTablespacePool = true +db6.usesLDAP = false +storageBasedCopy.db6.CommunicationPortNumber = 5912 +storageBasedCopy.db6.PortRangeEnd = 5917 +storageBasedCopy.db6.PortRangeStart = 5914 +# # +# END section db_config_anydb_ibmdb2 # +################################################################### +{% endif %} +{% if 'db_config_anydb_oracledb' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section db_config_anydb_oracledb # +# # +NW_ABAP_Import_Dialog.migmonJobNum = 3 +NW_ABAP_Import_Dialog.migmonLoadArgs = -stop_on_error -loadprocedure fast +NW_getDBInfoGeneric.dbsid = {{ sap_swpm_db_sid }} +storageBasedCopy.ora.listenerName = SAPORALISTENER +# storageBasedCopy.ora.listenerPort = +storageBasedCopy.ora.ABAPSchema = {{ sap_swpm_db_schema_abap }} +# storageBasedCopy.ora.JavaSchema = {{ sap_swpm_db_schema_java }} +# storageBasedCopy.ora.swowner = oracle +ora.createStatisticsCodeABAP = SKIP +ora.createStatisticsCodeJAVA = SKIP +ora.multitenant.pdbsid = {{ sap_swpm_sid | upper }} +ora.whatInstallation = isSingle +# ora.IgnoreClientVersion = false +# ora.maxDatafileSize = 2000 + +#### Oracle Multitenant Pluggable DB: #### +#### a single Oracle Container Database (CDB) can host multiple Oracle Pluggable Databases (PDB) #### +## FALSE: no pluggable installation (default value) +## CDB_PDB: install CDB and PDB +## PDB_ONLY: install PDB only in an existing CDB. +## CDB_ONLY: install CDB only. +ora.multitenant.installMT = FALSE +# # +# END section db_config_anydb_oracledb # +################################################################### +{% endif %} +{% if 'db_config_anydb_oracledb_121' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section db_config_anydb_oracledb_121 # +# # +# Use path to Oracle Home - Runtime (i.e. $OHRDBMS env var) +ora.dbhome = /oracle/{{ sap_swpm_db_sid }}/121 +storageBasedCopy.ora.clientVersion = 121 +storageBasedCopy.ora.serverVersion = 121 +# # +# END section db_config_anydb_oracledb_121 # +################################################################### +{% endif %} +{% if 'db_config_anydb_oracledb_122' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section db_config_anydb_oracledb_122 # +# # +# Use path to Oracle Home - Runtime (i.e. $OHRDBMS env var) +ora.dbhome = /oracle/{{ sap_swpm_db_sid }}/122 +storageBasedCopy.ora.clientVersion = 122 +storageBasedCopy.ora.serverVersion = 122 +# # +# END section db_config_anydb_oracledb_122 # +################################################################### +{% endif %} +{% if 'db_config_anydb_oracledb_19' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section db_config_anydb_oracledb_19 # +# # +# Use path to Oracle Home - Runtime (i.e. $OHRDBMS env var) +ora.dbhome = /oracle/{{ sap_swpm_db_sid }}/19 +storageBasedCopy.ora.clientVersion = 19 +storageBasedCopy.ora.serverVersion = 19 +# # +# END section db_config_anydb_oracledb_19 # +################################################################### +{% endif %} +{% if 'db_config_anydb_sapase' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section db_config_anydb_sapase # +# # +NW_ABAP_Import_Dialog.migmonJobNum = 3 +NW_ABAP_Import_Dialog.migmonLoadArgs = -c 100000 -loadprocedure fast +NW_SYB_DBPostload.numberParallelStatisticJobs = 0 +SYB.NW_DB.aseSortOrder = binaryalt +SYB.NW_DB.databaseDevices = data device for SAP,/sybase/{{ sap_swpm_sid | upper }}/sapdata_1,88,,,{{ sap_swpm_sid | upper }}_data_001,log device for SAP,/sybase/{{ sap_swpm_sid | upper }}/saplog_1,10,,,{{ sap_swpm_sid | upper }}_log_001,data device for saptools,/sybase/{{ sap_swpm_sid | upper }}/sapdiag,2,,,saptools_data_001,log device for saptools,/sybase/{{ sap_swpm_sid | upper }}/sapdiag,2,,,saptools_log_001,data device for sybsecurity,/sybase/{{ sap_swpm_sid | upper }}/sybsecurity,1,,,sybsecurity_data_001,data device for sybsecurity,/sybase/{{ sap_swpm_sid | upper }}/sybsecurity,1,,,sybsecurity_data_002,log device for sybsecurity,/sybase/{{ sap_swpm_sid | upper }}/sybsecurity,0.5,,,sybsecurity_log_001,temp device for SAP,/sybase/{{ sap_swpm_sid | upper }}/saptemp,8,,,saptempdb_data_001, +SYB.NW_DB.databaseType = ase +SYB.NW_DB.enableGranularPermissions = true +SYB.NW_DB.enableStrongCipherSuitesForSSL = false +SYB.NW_DB.folderDatabaseSoftware = /sybase/{{ sap_swpm_sid | upper }} +SYB.NW_DB.folderDiagDevice = /sybase/{{ sap_swpm_sid | upper }}/sapdiag +SYB.NW_DB.folderSAPTempdbDevice = /sybase/{{ sap_swpm_sid | upper }}/saptemp +SYB.NW_DB.folderSecurityDevices = /sybase/{{ sap_swpm_sid | upper }}/sybsecurity +SYB.NW_DB.folderSystemDevices = /sybase/{{ sap_swpm_sid | upper }}/sybsystem +SYB.NW_DB.folderTempdbDevice = /sybase/{{ sap_swpm_sid | upper }}/sybtemp +SYB.NW_DB.indexConsumers = 3 +SYB.NW_DB.initializeDefaultSystemEncryptionPassword = false +SYB.NW_DB.maxIndexParallelDegree = 10 +SYB.NW_DB.maxQueryParallelDegree = 10 +SYB.NW_DB.numberWorkerProcesses = 50 +SYB.NW_DB.sqlServerConnections = 200 +SYB.NW_DB.sqlServerHostname = {{ sap_swpm_db_host }} +SYB.NW_DB.sybmgmtdbDataDeviceFolder = /sybase/{{ sap_swpm_sid | upper }}/sybsystem +SYB.NW_DB.sybmgmtdbLogDeviceFolder = /sybase/{{ sap_swpm_sid | upper }}/sybsystem +SYB.NW_DB.userstore_hostname = {{ sap_swpm_ascs_instance_hostname }} + +# To avoid conflicts, leave all Ports blank and SAP SWPM will auto-assign +# Ports by default are in order 4901, 4902, 4903, 4904. For each new ASE DB Server instance on the host, each port number is incremented by 4 +SYB.NW_DB.portDatabaseServer = +SYB.NW_DB.portBackupServer = +SYB.NW_DB.portJobScheduler = +SYB.NW_DB.portXPServer = +# # +# END section db_config_anydb_sapase # +################################################################### +{% endif %} +{% if 'db_config_anydb_sapmaxdb' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section db_config_anydb_sapmaxdb # +# # +NW_ABAP_Import_Dialog.migmonJobNum = 90 +NW_ABAP_Import_Dialog.migmonLoadArgs = -para_cnt 90 +NW_ADA_getDBInfo.dbsid = {{ sap_swpm_db_sid }} +SdbInstanceDialogs.DB_sessions = 100 +SdbInstanceDialogs.minlogsize = 4000 +SdbInstanceDialogs.sapdataFolder = sapdata +SdbInstanceDialogs.saplogFolder = saplog +# # +# END section db_config_anydb_sapmaxdb # +################################################################### +{% endif %} +{% if 'db_connection_nw_hana' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section db_connection_nw_hana # +# # +NW_HDB_getDBInfo.dbhost = {{ sap_swpm_db_host }} +NW_HDB_getDBInfo.dbsid = {{ sap_swpm_db_sid }} +NW_HDB_getDBInfo.instanceNumber = {{ sap_swpm_db_instance_nr }} +NW_HDB_getDBInfo.systemid = {{ sap_swpm_db_sid }} +NW_HDB_getDBInfo.systemPassword = {{ sap_swpm_db_system_password }} +# NW_HDB_getDBInfo.systemDbSid = SystemDB +NW_HDB_getDBInfo.systemDbPassword = {{ sap_swpm_db_systemdb_password }} +NW_HDB_DB.abapSchemaName = {{ sap_swpm_db_schema_abap }} +NW_HDB_DB.abapSchemaPassword = {{ sap_swpm_db_schema_abap_password }} +NW_HDB_DB.javaSchemaName = {{ sap_swpm_db_schema_java }} +NW_HDB_DB.javaSchemaPassword = {{ sap_swpm_db_schema_java_password }} +NW_Recovery_Install_HDB.extractLocation = /usr/sap/{{ sap_swpm_db_sid }}/HDB{{ sap_swpm_db_instance_nr }}/backup/data/DB_HDB +NW_Recovery_Install_HDB.extractParallelJobs = {{ sap_swpm_parallel_jobs_nr }} +NW_Recovery_Install_HDB.sidAdmName = {{ sap_swpm_db_sid | lower }}adm +NW_Recovery_Install_HDB.sidAdmPassword = {{ sap_swpm_db_sidadm_password }} +# NW_HDB_getDBInfo.dbadmin = SYSTEM +# NW_HDB_getDBInfo.tenantOsGroup = {{ sap_swpm_db_sid | lower }}grp +# NW_HDB_getDBInfo.tenantOsUser = {{ sap_swpm_db_sid | lower }}usr +# NW_HDB_getDBInfo.tenantPort = +# # +# END section db_connection_nw_hana # +################################################################### +{% endif %} +{% if 'db_connection_nw_anydb_ibmdb2' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section db_connection_nw_anydb_ibmdb2 # +# # +# db6.UseDb2SSLClientServerComm = false +nwUsers.db6.sapsidPassword = {{ sap_swpm_sapadm_password }} +# nwUsers.db6.sapsidUid = + +# nwUsers.db6.sapsiddbPassword = +# nwUsers.db6.sapsiddbUid = + +# Database Schema and Database Connect User for ABAP (default is sap and not sap) +NW_DB6_DB.db6.abap.connect.user = sap{{ sap_swpm_sid | lower }} +NW_DB6_DB.db6.abap.schema = sap{{ sap_swpm_sid | lower }} +# NW_DB6_DB.db6.java.connect.user = +# NW_DB6_DB.db6.java.schema = +# # +# END section db_connection_nw_anydb_ibmdb2 # +################################################################### +{% endif %} +{% if 'db_connection_nw_anydb_oracledb' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section db_connection_nw_anydb_oracledb # +# # +storageBasedCopy.abapSchemaPassword = {{ sap_swpm_db_schema_abap_password }} +storageBasedCopy.javaSchemaPassword = {{ sap_swpm_db_schema_java_password }} +# # +# END section db_connection_nw_anydb_oracledb # +################################################################### +{% endif %} +{% if 'db_connection_nw_anydb_sapase' in sap_swpm_inifile_sections_list %} + +################################################################### +# db_connection_nw_anydb_sapase +################################################################### +# NW_SYB_CIABAP.sapsaPassword = +{% endif %} +{% if 'db_restore_hana' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section db_restore_hana # +# # +NW_HDB_getDBInfo.systemPasswordBackup = {{ sap_swpm_backup_system_password }} +HDB_Recovery_Dialogs.backupLocation = {{ sap_swpm_backup_location }} +HDB_Recovery_Dialogs.backupName = {{ sap_swpm_backup_prefix }} +HDB_Recovery_Dialogs.sapControlWsdlUrl = http://{{ sap_swpm_db_host }}:5{{ sap_swpm_db_instance_nr }}13/SAPControl?wsdl +HDB_Recovery_Dialogs.sidAdmName = {{ sap_swpm_db_sid | lower }}adm +HDB_Recovery_Dialogs.sidAdmPassword = {{ sap_swpm_db_sidadm_password }} +# HDB_Recovery_Dialogs.backupDestinationType = File +# HDB_Recovery_Dialogs.licenseFile = +# HDB_Recovery_Dialogs.skipExistenceCheck = false +# HDB_Recovery_Dialogs.sourceDatabaseSid = +# HDB_Recovery_Dialogs.useLicenseFile = false +# NW_Recovery_Install_HDB.checkIntegrity = false +# NW_Recovery_Install_HDB.backupLocationHANA = +# NW_Recovery_Install_HDB.backupLocationSAP = +# NW_Recovery_Install_HDB.loadOrMount = load +# HDB_System_Check_Dialogs.initTopology = false +# NW_CreateDBandLoad.movePVCforUsagePiAndDi = +# # +# END section db_restore_hana # +################################################################### +{% endif %} +{% if 'nw_config_anydb' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section nw_config_anydb # +# # +# Distributed installation or system copy with any database and SAP Basis release 740 or higher: +# Execute ABAP program 'RUTPOADAPT' for depooling. Set it to 'true' if declustering / depooling is selected for the distributed database instance installation option +NW_CI_Instance_ABAP_Reports.executeReportsForDepooling = false +# # +# END section nw_config_anydb # +################################################################### +{% endif %} +{% if 'nw_config_other' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section nw_config_other # +# # +# NW_Delete_Sapinst_Users.removeUsers = false +NW_getFQDN.FQDN = {{ sap_swpm_fqdn }} +NW_getFQDN.setFQDN = {{ sap_swpm_set_fqdn | lower }} +# NW_getFQDN.resolve = true +NW_GetSidNoProfiles.sid = {{ sap_swpm_sid }} +# NW_GetSidNoProfiles.sapmnt = /sapmnt +# NW_GetSidNoProfiles.strictSidCheck = true +# NW_GetSidNoProfiles.unicode = true +NW_readProfileDir.profileDir = /sapmnt/{{ sap_swpm_sid | upper }}/profile +# NW_readProfileDir.profilesAvailable = +NW_getLoadType.loadType = {{ sap_swpm_load_type }} +# NW_getUnicode.isUnicode = +# MessageServer.configureAclInfo = false +# NW_Exit_Before_Systemstart.exit = false +# NW_adaptProfile.skipSecurityProfileSettings = false +# OS4.DestinationASP = +# # +# END section nw_config_other # +################################################################### +{% endif %} +{% if 'nw_config_central_services_abap' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section nw_config_central_services_abap # +# # +# Central Services (ASCS) contains the Message server (MS) and Enqueue work processes (EN) for the ABAP Dispatcher. +# Formerly the processes were contained in the Central Instance (CI). +################################################################### +NW_CI_Instance.ascsVirtualHostname = {{ sap_swpm_ascs_instance_hostname }} +NW_CI_Instance.ascsInstanceNumber = {{ sap_swpm_ascs_instance_nr }} +# NW_SCS_Instance.ascsVirtualHostname = {{ sap_swpm_ascs_instance_hostname }} +NW_SCS_Instance.ascsInstanceNumber = {{ sap_swpm_ascs_instance_nr }} +# # +# END section nw_config_central_services_abap # +################################################################### +{% endif %} +{% if 'nw_config_central_services_java' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section nw_config_central_services_java # +# # +# SAP Java Central Services Instance (SCS) contains: +# - Java Message server (MS), +# - Java Enqueue server (EN), +# - Java Gateway (GW) and +# - Java Internal Web Dispatcher (WD). +################################################################### +NW_CI_Instance.scsVirtualHostname = {{ sap_swpm_java_scs_instance_hostname }} +NW_CI_Instance.scsInstanceNumber = {{ sap_swpm_java_scs_instance_nr }} +NW_SCS_Instance.scsVirtualHostname = {{ sap_swpm_java_scs_instance_hostname }} +# NW_SCS_Instance.scsInstanceNumber = +NW_SCS_Instance.instanceNumber = {{ sap_swpm_java_scs_instance_nr }} +NW_JAVA_Export.keyPhrase = {{ sap_swpm_master_password }} +# # +# END section nw_config_central_services_java # +################################################################### +{% endif %} +{% if 'nw_config_primary_application_server_instance' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section nw_config_primary_application_server_instance # +# # +# Primary Application Server (PAS) contains: +# - Internet Communication Manager (ICM), +# - Gateway (GW) and +# - ABAP Dispatcher (DI/WP) work processes. +# Formerly called the Central Instance (CI). +NW_CI_Instance.ciVirtualHostname = {{ sap_swpm_pas_instance_hostname }} +NW_CI_Instance.ciInstanceNumber = {{ sap_swpm_pas_instance_nr }} +# NW_CI_Instance.nodesNum = +# NW_CI_Instance.nodesNumber = defNodes +# NW_WPConfiguration.ciBtcWPNumber = 6 +# NW_WPConfiguration.ciDialogWPNumber = 10 +# # +# END section nw_config_primary_application_server_instance # +################################################################### +{% endif %} +{% if 'nw_config_additional_application_server_instance' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section nw_config_additional_application_server_instance # +# # +# Additional Application Server (AAS) contains: +# - ABAP Dispatcher (DI/WP) work processes. +# Formerly called the Dialog Instance (DI). +# Instance number of SAP NetWeaver Application Server. Leave empty for default. +NW_AS.instanceNumber = {{ sap_swpm_aas_instance_nr }} + +# Do not skip unpacking archives if adding the SAP NetWeaver Application Server to another operating system / host. Default is 'false'. +# NW_AS.skipUnpacking = false + +# Start the SAP NetWeaver Application Server at the end of the installation. Default is 'true'. +# NW_AS.start = true + +# Virtual host name of the SAP NetWeaver Application Server instance. Leave empty to use the existing host name +NW_DI_Instance.virtualHostname = {{ sap_swpm_aas_instance_hostname }} +# # +# END section nw_config_additional_application_server_instance # +################################################################### +{% endif %} +{% if 'nw_config_ers' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section nw_config_ers # +# # +nw_instance_ers.ersVirtualHostname = {{ sap_swpm_ers_instance_hostname }} +nw_instance_ers.ersInstanceNumber = {{ sap_swpm_ers_instance_nr }} + +# Disable 'Automatic Instance and Service Restart' for SAP SWPM Unattended Mode, +# otherwise by default SAP SWPM will use sapcontrol -queryuser -function Stop and will cause error +# "User? Password? Stop. FAIL: Invalid Credentials" +nw_instance_ers.restartSCS = false +# # +# END section nw_config_ers # +################################################################### +{% endif %} +{% if 'nw_config_ports' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section nw_config_ports # +# # +NW_CI_Instance.ciMSPort = 36{{ sap_swpm_ascs_instance_nr }} +NW_checkMsgServer.abapMSPort = 36{{ sap_swpm_ascs_instance_nr }} +# NW_CI_Instance.ciMSPortInternal = +# NW_CI_Instance.createGlobalProxyInfoFile = false +# NW_CI_Instance.createGlobalRegInfoFile = false +# NW_CI_Instance.scsMSPortInternal = +# NW_SCS_Instance.scsMSPort = +# NW_SCS_Instance.createGlobalProxyInfoFile = false +# NW_SCS_Instance.createGlobalRegInfoFile = false +# # +# END section nw_config_ports # +################################################################### +{% endif %} +{% if 'nw_config_java_ume' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section nw_config_java_ume # +# # +UmeConfiguration.adminName = J2EE_ADM_{{ sap_swpm_sid }} +UmeConfiguration.adminPassword = {{ sap_swpm_ume_j2ee_admin_password }} +UmeConfiguration.guestName = J2EE_GST_{{ sap_swpm_sid }} +UmeConfiguration.sapjsfPassword = {{ sap_swpm_ume_sapjsf_password }} +UmeConfiguration.umeClient = {{ sap_swpm_ume_client_nr }} +UmeConfiguration.umeHost = {{ sap_swpm_pas_instance_hostname }} +UmeConfiguration.umeInstance = {{ sap_swpm_ume_instance_nr }} +UmeConfiguration.umeType = {{ sap_swpm_ume_type }} +# UmeConfiguration.sapjsfName = SAPJSF +# # +# END section nw_config_java_ume # +################################################################### +{% endif %} +{% if 'nw_config_java_feature_template_ids' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section nw_config_java_feature_template_ids # +# # +NW_internal.useProductVersionDescriptor = true +nw_java_import.buildJEEusingExtraMileTool = {{ true if sap_swpm_java_import_method == 'extramile' else false }} + +# If use PV = true +# SAP SWPM 1.0 for SAP NetWeaver AS (JAVA), Product Version Software Instance **Feature Template IDs** comma-separated list +Select_PPMS_Instances.ListOfSelectedInstances = {% set selected_ids = [] %}{%- for item_selected in sap_swpm_java_template_id_selected_list %} +{%- if item_selected in sap_swpm_java_template_id_lookup_dictionary -%} +{{ selected_ids.append(sap_swpm_java_template_id_lookup_dictionary[item_selected]) }} +{%- endif %} +{%- endfor %}{{ selected_ids | flatten | join(',') }} + +## If use PV = false [LEGACY for before NWAS JAVA 7.40] +## Comma-separated value list containing which product instances (formerly known as usage types) are installed. Used for handling product instances in unattended mode. +## SAP_Software_Features_Select.selectedInstancesForInstallation = AS,AAS,BASIC,NW-MODEL,ESR,PI,PI-AF +# # +# END section nw_config_java_feature_template_ids # +################################################################### +{%- endif %} +{% if 'nw_config_webdisp_generic' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section nw_config_webdisp_generic # +# # +NW_Webdispatcher_Instance.wdInstanceNumber = {{ sap_swpm_wd_instance_nr }} +# NW_webdispatcher_Instance.encryptionMode = Always +# NW_webdispatcher_Instance.useWdHTTPPort = false +NW_webdispatcher_Instance.wdHTTPPort = 80{{ sap_swpm_wd_instance_nr }} +NW_webdispatcher_Instance.wdHTTPSPort = 443{{ sap_swpm_wd_instance_nr }} +NW_webdispatcher_Instance.wdVirtualHostname = {{ sap_swpm_wd_virtual_host }} + +NW_Webdispatcher_Instance.configureSystemConnectivity = {{ sap_swpm_wd_system_connectivity | lower }} +NW_webdispatcher_Instance.backEndSID = {{ sap_swpm_wd_backend_sid }} +NW_webdispatcher_Instance.msHTTPPort = {{ sap_swpm_wd_backend_ms_http_port }} +NW_webdispatcher_Instance.msHost = {{ sap_swpm_wd_backend_ms_host }} +NW_webdispatcher_Instance.scenarioSize = {{ sap_swpm_wd_backend_scenario_size }} + +NW_webdispatcher_Instance.activateICF = {{ sap_swpm_wd_activate_icf | lower }} +NW_webdispatcher_Instance.rfcHost = {{ sap_swpm_wd_backend_rfc_host }} +NW_webdispatcher_Instance.rfcInstance = {{ sap_swpm_wd_backend_rfc_instance_nr }} +NW_webdispatcher_Instance.rfcClient = {{ sap_swpm_wd_backend_rfc_client_nr }} +NW_webdispatcher_Instance.rfcUser = {{ sap_swpm_wd_backend_rfc_user }} +NW_webdispatcher_Instance.rfcPassword = {{ sap_swpm_wd_backend_rfc_user_password }} +# # +# END section nw_config_webdisp_generic # +################################################################### +{% endif %} +{% if 'nw_config_webdisp_gateway' in sap_swpm_inifile_sections_list %} + +################################################################### +# nw_config_webdisp_gateway +# +# It is recommended to install gateway as part of ASCS +# It is NOT recommended to install webdispatcher as part of ASCS. A separate Web Dispatcher instance should be installed (SAP Note 908097) +################################################################### +NW_CI_Instance.ascsInstallGateway = {{ sap_swpm_ascs_install_gateway | lower }} +# NW_SCS_Instance.ascsInstallGateway = {{ sap_swpm_ascs_install_gateway | lower }} + +# Embedded SAP Web Dispatcher +# NW_CI_Instance.ascsInstallWebDispatcher = false +# NW_SCS_Instance.ascsInstallWebDispatcher = false +{% endif %} +{% if 'nw_config_host_agent' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section nw_config_host_agent # +# # +NW_System.installSAPHostAgent = {{ sap_swpm_install_saphostagent | lower }} +# # +# END section nw_config_host_agent # +################################################################### +{% endif %} +{% if 'nw_config_post_load_abap_reports' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section nw_config_post_load_abap_reports # +# # +# Activate ICF node '/SAP/BC/REST/SLPROTOCOL' +NW_CI_Instance_ABAP_Reports.enableActivateICFService = true + +# SAP INTERNAL USE ONLY +# NW_CI_Instance_ABAP_Reports.enableSPAMUpdateWithoutStackXml = false + +# SAP INTERNAL USE ONLY +# NW_CI_Instance_ABAP_Reports.enableTMSConfigWithoutStackXml = false + +# SAP INTERNAL USE ONLY +# NW_CI_Instance_ABAP_Reports.enableTransportsWithoutStackXml = false + +# Need specific new password of the DDIC user in client 000, different from Master Password +# NW_CI_Instance_ABAP_Reports.needNewDDIC000Password = false + +# Need specific new password of the DDIC user in client 001, different from Master Password +# NW_CI_Instance_ABAP_Reports.needNewDDIC001Password = false + +# Need specific new password of the SAP* user in client 000, different from Master Password +# NW_CI_Instance_ABAP_Reports.needNewSapStar000Password = false + +# Need specific new password of the SAP* user in client 001, different from Master Password +# NW_CI_Instance_ABAP_Reports.needNewSapStar001Password = false + +# Specify new password of the DDIC user in client 000, different from Master Password +# NW_CI_Instance_ABAP_Reports.ddic000Password = + +# Specify new password of the DDIC user in client 001, different from Master Password +# NW_CI_Instance_ABAP_Reports.ddic001Password = + +# Specify new password of the SAP* user in client 000, different from Master Password +# NW_CI_Instance_ABAP_Reports.sapStar000Password = + +# Specify new password of the SAP* user in client 001, different from Master Password +# NW_CI_Instance_ABAP_Reports.sapStar001Password = +# # +# END section nw_config_post_load_abap_reports # +################################################################### +{% endif %} +{% if 'nw_config_livecache' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section nw_config_livecache # +# # +NW_liveCache.controlUserPwd = +NW_liveCache.liveCacheHost = +NW_liveCache.liveCacheID = +NW_liveCache.liveCacheUser = +NW_liveCache.liveCacheUserPwd = +NW_liveCache.useLiveCache = +# # +# END section nw_config_livecache # +################################################################### +{% endif %} +{% if 'nw_config_sld' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section nw_config_sld # +# # +NW_SLD_Configuration.configureSld = +NW_SLD_Configuration.sldHost = +NW_SLD_Configuration.sldPort = +NW_SLD_Configuration.sldUseHttps = +NW_SLD_Configuration.sldUser = +NW_SLD_Configuration.sldUserPassword = +# # +# END section nw_config_sld # +################################################################### +{% endif %} +{% if 'nw_config_abap_language_packages' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section nw_config_abap_language_packages # +# # +NW_Language_Inst_Dialogs.install = true +# Path to language archive files (e.g. S4HANAOP***_LANG_EN.SAR) +NW_Language_Inst_Dialogs.folders = /software +# Selected languages comma-separated list (by default DE,EN are installed) +NW_Language_Inst_Dialogs.languages = AR,BG,CA,CS,DA,EL,ES,ET,FI,FR,HE,HI,HR,HU,IT,JA,KK,KO,LT,LV,MS,NL,NO,PL,PT,RO,RU,SH,SK,SL,SV,TH,TR,UK,VI,ZF,ZH +# # +# END section nw_config_abap_language_packages # +################################################################### +{% endif %} +{% if 'sap_os_linux_user' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section sap_os_linux_user # +# # +nwUsers.sapadmUID = {{ sap_swpm_sapadm_uid }} +nwUsers.sapsysGID = {{ sap_swpm_sapsys_gid }} +nwUsers.sidAdmUID = {{ sap_swpm_sidadm_uid }} +# # +# END section sap_os_linux_user # +################################################################### +{% endif %} +{% if 'swpm_installation_media_download_service' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section swpm_installation_media_download_service # +# Note: This section is not in use by sap_swpm Ansible Role # +# # +# nwUsers.sapServiceSIDPassword = +# download_service.directory = +# DownloadService.EnableProxy = +# DownloadService.HostName = +# DownloadService.Password = +# DownloadService.Port = +# DownloadService.ProvideAuthentication = +# DownloadService.Username = +# DownloadService.planNumber = +# # +# END section swpm_installation_media_download_service # +################################################################### +{% endif %} +{% if 'nw_config_java_icm_credentials' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section nw_config_java_icm_credentials # +# # +NW_IcmAuth.webadmPassword = {{ sap_swpm_ume_j2ee_admin_password }} +# # +# END section nw_config_java_icm_credentials # +################################################################### +{% endif %} +{% if 'solman_abap_swpm1' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section solman_abap_swpm1 # +# Note: This section is not in use by sap_swpm Ansible Role # +# # +InitDeclusteringForImport.decluster = false +# # +# END section solman_abap_swpm1 # +################################################################### +{% endif %} +{% if 'solman_daa_swpm1' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section solman_daa_swpm1 # +# Note: This section is not in use by sap_swpm Ansible Role # +# # +# DiagnosticsAgent.dasidAdmPassword = {{ sap_swpm_diagnostics_agent_password }} +# DiagnosticsAgent.installSAPHostAgent +# DiagnosticsAgent.InstanceNumber +# DiagnosticsAgent.LogicalHostName +# DiagnosticsAgent.SAPJVMVersion +# DiagnosticsAgent.SAProuter.Password +# DiagnosticsAgent.SAProuter.RouteString +# DiagnosticsAgent.SID +# DiagnosticsAgent.SLD.Connection +# DiagnosticsAgent.SLD.HostName +# DiagnosticsAgent.SLD.Password +# DiagnosticsAgent.SLD.PortNumber +# DiagnosticsAgent.SLD.UseHTTPS +# DiagnosticsAgent.SLD.UserName +# DiagnosticsAgent.SolMan.Connection +# DiagnosticsAgent.SolMan.HostName +# DiagnosticsAgent.SolMan.Password +# DiagnosticsAgent.SolMan.PortNumber +# DiagnosticsAgent.SolMan.UserName +# DiagnosticsAgent.SolMan.UseSSL +# # +# END section solman_daa_swpm1 # +################################################################### +{% endif %} +{% if 'syscopy_export_anydb' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section syscopy_export_anydb # +# Note: This section is not in use by sap_swpm Ansible Role # +# # +# InitDeclusteringForExport.decluster = +# NW_ABAP_Export_Dialog.customPackageOrder = +# NW_ABAP_Export_Dialog.customSortOrderFile = +# NW_ABAP_Export_Dialog.exportTimeFile = +# NW_ABAP_Export_Dialog.importTimeFile = +# NW_ABAP_Export_Dialog.jobNumberGroupLarge = 7 +# NW_ABAP_Export_Dialog.jobNumberGroupSmall = 4 +# NW_ABAP_Export_Dialog.migmonComHost = +# NW_ABAP_Export_Dialog.migmonComPort = +# NW_ABAP_Export_Dialog.migmonComType = EXCHANGE +# NW_ABAP_Export_Dialog.migmonDataTransferType = NET +# NW_ABAP_Export_Dialog.migmonFtpExchangeDir = +# NW_ABAP_Export_Dialog.migmonFtpExportDir = +# NW_ABAP_Export_Dialog.migmonFtpHost = +# NW_ABAP_Export_Dialog.migmonFtpPassword = +# NW_ABAP_Export_Dialog.migmonFtpUser = +NW_ABAP_Export_Dialog.migmonJobNum = 3 +NW_ABAP_Export_Dialog.migmonLoadArgs = -stop_on_error +# NW_ABAP_Export_Dialog.migmonNetExchangeDir = +# NW_ABAP_Export_Dialog.migmonTaskArgs = +# NW_ABAP_Export_Dialog.nonStandardAbapObjectsHandlingSkip = false +NW_ABAP_Export_Dialog.parallelR3szchkExecution = true +NW_ABAP_Export_Dialog.r3szchkDetermineSizeValue = DB +# NW_ABAP_Export_Dialog.r3szchkJobNum = 10 +NW_ABAP_Export_Dialog.repeatExport = COMPLETE +NW_ABAP_Export_Dialog.splitPackageLimitVal = 5000 +# NW_ABAP_Export_Dialog.splitMaxTableNumVal = 1000 +# NW_ABAP_Export_Dialog.splitTableFile = +# NW_ABAP_Export_Dialog.splitTableLimitVal = 300 +# NW_ABAP_Export_Dialog.splitTableNumVal = 10 +# NW_ABAP_Export_Dialog.splitUseMaxTableNum = false +# NW_ABAP_Export_Dialog.splitUsePackageLimit = true +# NW_ABAP_Export_Dialog.splitUseTableFile = false +# NW_ABAP_Export_Dialog.splitUseTableLimit = false +# NW_ABAP_Export_Dialog.splitUseTableNum = true +# NW_ABAP_Export_Dialog.sqlFileDir = +NW_ABAP_Export_Dialog.targetHardwarePlatform = LITTLE_ENDIAN + +## Target database types for Linux are ADA, HDB, DB6, ORA, SYB +NW_ABAP_Export_Dialog.targetDbType = {{ sap_swpm_export_target_db_type }} + +# NW_ABAP_Export_Dialog.useAdditionalExportHosts = false +# NW_ABAP_Export_Dialog.useAdvancedUnloadConfig = false +# NW_ABAP_Export_Dialog.useCustomPackageOrder = false +# NW_ABAP_Export_Dialog.useCustomSortOrder = false +# NW_ABAP_Export_Dialog.useMigMonConfig = false +# NW_ABAP_Export_Dialog.useParallelExportImport = false +# NW_ABAP_Export_Dialog.useSplit = true +NW_ABAP_Export_Dialog.useSqlFiles = NOSQL +# NW_ABAP_Export_Dialog.useUnicodeTargetSystem = +NW_ABAP_Export_Dialog.useUnsortedUnload = true + +NW_Export.accessLevel4ExportDir = DEFAULT +NW_Export.choiceSepKernel = false +NW_Export.mainExportDir = {{ sap_swpm_export_files_path }} + +# Do not stop SAP System before data is unloaded +# SAP SWPM is unable to automatically stop the SAP System (i.e. DB, ASCS, PAS instances), +# if stop is true then SAP SWPM Unattended will fail on step mainExportParameters +NW_Export.stopRunningSystem = true + +NW_readProfileDir.profileDir = /sapmnt/{{ sap_swpm_sid | upper }}/profile + +NW_getLoadType.loadType = {{ sap_swpm_load_type }} +NW_getLoadType.importManuallyExecuted = false +# # +# END section syscopy_export_anydb # +################################################################### +{% endif %} +{% if 'syscopy_import_anydb_ibmdb2' in sap_swpm_inifile_sections_list %} + +################################################################### +# BEGIN section syscopy_import_anydb_ibmdb2 # +# Note: This section is not in use by sap_swpm Ansible Role # +# # +# db6.Additional_DbServer = +# db6.cluster.HADRPort1 = +# db6.cluster.HADRPort2 = +# db6.cluster.SyncMode = +# db6.ConfigureCluster = false +# db6.DropSchemaList = +# db6.InstallPureScale = false +# db6.InstallTSA = false +# db6.minimizeDatabaseSizeCompression = +# db6.minimizeDatabaseSizeCompressionJava = +# db6.minimizeDatabaseSizeDeferredTable = true +# db6.notuseMcod = +# db6.NumAdditionalPartitions = +# db6.useDB2ControlFiles = false +# db6.UseDb2NativeEncryption = false +# NW_adaptProfile.templateFiles = +# NW_CreateDBandLoad.movePVCforUsagePiAndDi = +db6.allowUnsignedDatabaseSoftware = true +db6.cluster.ClusterType = HADR (High Availability Disaster Recovery) +db6.usingSystemCopyBRforHADR = true +NW_getDBInfoGeneric.dbhost = {{ sap_swpm_db_host }} +NW_getDBInfoGeneric.dbsid = {{ sap_swpm_db_sid }} +NW_getLoadType.loadType = {{ sap_swpm_load_type }} +NW_getLoadType.importManuallyExecuted = false +NW_getUnicode.isUnicode = true +# NW_getDBInfoGeneric.strictDbSidCheck = true +storageBasedCopy.db6.CommunicationPortNumber = 5912 +storageBasedCopy.db6.PortRangeEnd = 5917 +storageBasedCopy.db6.PortRangeStart = 5914 +# storageBasedCopy.db6.db6updatedbpath = +# # +# END section syscopy_import_anydb_ibmdb2 # +################################################################### +{% endif %}