Skip to content

Commit

Permalink
Merge pull request #840 from berndfinger/new-role-sap_swpm_2
Browse files Browse the repository at this point in the history
sap_swpm: New improved and simplified version
  • Loading branch information
berndfinger authored Nov 8, 2024
2 parents 2eeadd4 + f603471 commit ec1a47f
Show file tree
Hide file tree
Showing 24 changed files with 2,594 additions and 1,574 deletions.
969 changes: 797 additions & 172 deletions roles/sap_swpm/README.md

Large diffs are not rendered by default.

57 changes: 31 additions & 26 deletions roles/sap_swpm/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -45,30 +46,29 @@ 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
# for Default Mode
# - 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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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 --- #
Expand All @@ -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


########################################
Expand Down Expand Up @@ -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:


########################################
Expand Down Expand Up @@ -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


########################################
Expand All @@ -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:
Expand Down Expand Up @@ -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: ""
Expand All @@ -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
6 changes: 0 additions & 6 deletions roles/sap_swpm/requirements.yml

This file was deleted.

2 changes: 2 additions & 0 deletions roles/sap_swpm/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion roles/sap_swpm/tasks/post_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

########################################################################################################################

Expand Down
Loading

0 comments on commit ec1a47f

Please sign in to comment.