Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sap_swpm: New improved and simplified version #840

Merged
merged 34 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
4386599
sap_swpm: No longer use different execution modes
berndfinger Aug 2, 2024
ba5fe7c
sap_swpm: Improved section markers for inifile
berndfinger Aug 5, 2024
53fc46f
sap_swpm: Reorganize yml files, part 1
berndfinger Aug 5, 2024
4ef0900
sap_swpm: Fix task name
berndfinger Aug 6, 2024
73df286
sap_swpm: Speed up inifile generation if tag is specified
berndfinger Aug 6, 2024
e065e9f
sap_swpm: Integrate the inifile_reuse mode
berndfinger Aug 6, 2024
7eb407d
sap_swpm: Reorganize yml files, part 2
berndfinger Aug 7, 2024
a9323cd
sap_swpm: Improve variable detection
berndfinger Aug 9, 2024
f3b2381
sap_swpm: Fix typo in README.md
berndfinger Aug 12, 2024
18a7446
sap_swpm: Add certain parameter consistency checks
berndfinger Aug 15, 2024
61f1b7d
sap_swpm: Adapt README.md
berndfinger Aug 22, 2024
f7e5ef7
sap_swpm: Explain how to migrate playbooks
berndfinger Aug 22, 2024
16fd86f
sap_swpm: Fix two typos in inifile_params.j2
berndfinger Aug 22, 2024
03f372b
sap_swpm: Add missing single reverse quote
berndfinger Sep 5, 2024
f039b14
sap_swpm: Repeat PR #850 and solve ansible-lint error
berndfinger Sep 5, 2024
8ce28cf
sap_swpm: Further changes to README.md
berndfinger Sep 5, 2024
6f8e23b
Merge branch 'dev' into new-role-sap_swpm_2
berndfinger Sep 5, 2024
a7875d7
sap_swpm: Only mention the `vars:` section for redefining variables
berndfinger Sep 6, 2024
06c1739
sap_swpm: Recognize sap_swpm_templates_install_dictionary
berndfinger Sep 9, 2024
f0b8339
sap_swpm: No longer define sap_swpm_product_catalog_id...
berndfinger Sep 10, 2024
95ef236
sap_swpm: Allow undefined or empty sap_swpm_role_parameters_dict
berndfinger Sep 10, 2024
c012680
sap_swpm: Prioritize sap_swpm_templates_install_dictionary members
berndfinger Sep 19, 2024
a4ba100
sap_swpm: Adapt README.md to new standard
berndfinger Sep 27, 2024
ac4b06f
docs: Update readme and add vars section
marcelmamula Oct 3, 2024
c12fa43
sap_swpm: Use sap_maintain_etc_hosts role; use booleans
berndfinger Oct 21, 2024
54c4ed7
sap_swpm: Add support for HA virtual hostname resolution
berndfinger Oct 28, 2024
b2f7bc4
sap_swpm: remove roles/sap_swpm/requirements.yml
berndfinger Oct 31, 2024
87188fa
sap_swpm: Implement changes requested for virtual IP checks
berndfinger Nov 4, 2024
0034767
sap_swpm: Run the virtual IP checks before the swpm_prepare tasks
berndfinger Nov 4, 2024
3508e01
sap_swpm: Perform additional assertions for the install type
berndfinger Nov 4, 2024
262ca2e
sap_swpm: Do not include the installation type file for default case
berndfinger Nov 5, 2024
37fff99
sap_swpm: Skip comments in /etc/hosts check
berndfinger Nov 6, 2024
c1ec503
sap_swpm: Fix /etc/hosts ip address resolution
berndfinger Nov 6, 2024
f603471
sap_swpm: Improve the fail message for virt hostname resolution
berndfinger Nov 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading