Skip to content

Commit 72c576b

Browse files
authored
Merge pull request #18 from sap-linuxlab/dev
fix: cleanup file structure
2 parents 1d34a95 + 2d7607e commit 72c576b

28 files changed

+386
-265
lines changed

all/ansible_sap_ecc_hana_system_copy_hdb/ansible_playbook.yml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,25 @@
33
hosts: all
44
become: true
55

6-
vars:
7-
sap_hostname: "{{ ansible_hostname }}"
8-
sap_domain: "{{ ansible_domain }}"
9-
sap_ip: "{{ ansible_default_ipv4.address }}"
10-
sap_general_preconfigure_modify_etc_hosts: false
11-
sap_general_preconfigure_fail_if_reboot_required: no
12-
sap_hana_preconfigure_fail_if_reboot_required: no
13-
sap_hana_preconfigure_update: yes
14-
sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured: no
15-
16-
collections:
17-
- community.general
18-
- community.sap_launchpad
19-
206
# Use include_role inside Task block, instead of using roles declaration or Task block with import_roles.
217
# This ensures Ansible Roles, and the tasks within, will be parsed in sequence instead of parsing at Playbook initialisation
228
tasks:
239

10+
# Set facts based on the install dictionary and the default template selected
2411
- name: Set fact x86_64 softwarecenter_search_list_ecc_syscopy
2512
set_fact:
26-
softwarecenter_search_list_ecc_syscopy: "{{ softwarecenter_search_list_ecc_syscopy_x86_64 }}"
13+
softwarecenter_search_list_ecc_syscopy: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['softwarecenter_search_list_x86_64'] }}"
2714
when:
2815
- ansible_architecture == "x86_64"
2916

17+
# Set facts based on the install dictionary and the default template selected
3018
- name: Set fact ppc64le softwarecenter_search_list_ecc_syscopy
3119
set_fact:
32-
softwarecenter_search_list_ecc_syscopy: "{{ softwarecenter_search_list_ecc_syscopy_ppc64le }}"
20+
softwarecenter_search_list_ecc_syscopy: "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['softwarecenter_search_list_ppc64le'] }}"
3321
when:
3422
- ansible_architecture == "ppc64le"
3523

36-
- name: update etc hosts
24+
- name: Update etc hosts
3725
lineinfile:
3826
dest: /etc/hosts
3927
line: "{{ ansible_default_ipv4.address }}\t{{ ansible_hostname }}.{{ ansible_domain }}\t{{ ansible_hostname }}"

all/ansible_sap_ecc_hana_system_copy_hdb/ansible_playbook_dry_run.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
softwarecenter_search_query: "{{ item }}"
2727
dest: "{{ playbook_dir }}"
2828
dry_run: True
29-
with_items: "{{ softwarecenter_search_list_ecc_syscopy_x86_64 }}"
29+
with_items:
30+
- "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['softwarecenter_search_list_x86_64'] }}"
3031
when:
3132
- dry_run_test == "x86_64"
3233
# vars:
@@ -40,7 +41,8 @@
4041
softwarecenter_search_query: "{{ item }}"
4142
dest: "{{ playbook_dir }}"
4243
dry_run: True
43-
with_items: "{{ softwarecenter_search_list_ecc_syscopy_ppc64le }}"
44+
with_items:
45+
- "{{ sap_swpm_templates_install_dictionary[sap_swpm_templates_product_input]['softwarecenter_search_list_ppc64le'] }}"
4446
when:
4547
- dry_run_test == "ppc64le"
4648
# vars:

all/ansible_sap_ecc_hana_system_copy_hdb/create_ansible_extravars.tf

Lines changed: 120 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,41 @@ resource "local_file" "ansible_extravars" {
44
filename = "${path.root}/tmp/${var.module_var_hostname}/ansible_vars.yml"
55
file_permission = "0755"
66
content = <<EOF
7+
8+
# ---- Mandatory parameters : Ansible Defaults ---- #
9+
710
#ansible_python_interpreter: python3
811
9-
dry_run_test: "${var.module_var_dry_run_test}"
12+
# Default Ansible Facts populate into default variables for all Ansible Roles
13+
sap_hostname: "{{ ansible_hostname }}"
14+
sap_domain: "{{ ansible_domain }}"
15+
sap_ip: "{{ ansible_default_ipv4.address }}"
1016
11-
sap_swpm_ansible_role_mode: default_templates
12-
sap_swpm_templates_product_input: "${var.module_var_sap_swpm_template_selected}"
1317
18+
19+
# ---- Mandatory parameters : Preconfigure OS for SAP Software ---- #
20+
21+
# Configuration of Ansible Roles for preconfigure SAP (general, hana, netweaver)
22+
sap_general_preconfigure_modify_etc_hosts: false
23+
sap_general_preconfigure_reboot_ok: no
24+
sap_general_preconfigure_fail_if_reboot_required: no
25+
sap_hana_preconfigure_reboot_ok: yes
26+
sap_hana_preconfigure_fail_if_reboot_required: no
27+
sap_hana_preconfigure_update: yes
28+
sap_hana_update_etchosts: yes
29+
sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured: no
30+
31+
32+
33+
# ---- Mandatory parameters : SAP Software installation media downloads ---- #
34+
35+
dry_run_test: "${var.module_var_dry_run_test}"
36+
37+
# SAP ONE Support Launchpad credentials
1438
suser_id: "${var.module_var_sap_id_user}"
1539
suser_password: '${var.module_var_sap_id_user_password}'
1640
17-
softwarecenter_search_list_ecc_syscopy_x86_64:
18-
- 'SAPCAR_1115-70006178.EXE'
19-
- 'IMDB_SERVER20_059_4-80002031.SAR'
20-
- 'IMDB_LCAPPS_2059_0-20010426.SAR'
21-
- 'IMDB_AFL20_059_0-80001894.SAR'
22-
- 'VCH202000_2059_0-80005463.SAR'
23-
- 'SWPM10SP35_6-20009701.SAR'
24-
- 'igsexe_12-80003187.sar' # IGS 7.53
25-
- 'igshelper_17-10010245.sar'
26-
- 'SAPEXE_800-80002573.SAR' # Kernel Part I (753)
27-
- 'SAPEXEDB_800-80002572.SAR' # Kernel Part II (753)
28-
- 'IMDB_CLIENT20_007_26-80002082.SAR'
29-
- 'SAPHOSTAGENT51_51-20009394.SAR'
30-
31-
softwarecenter_search_list_ecc_syscopy_ppc64le:
32-
- 'SAPCAR_1115-70006238.EXE'
33-
- 'IMDB_SERVER20_059_4-80002046.SAR'
34-
- 'IMDB_LCAPPS_2059_0-80002183.SAR'
35-
- 'IMDB_AFL20_059_0-80002045.SAR'
36-
- 'VCH202000_2059_0-80005464.SAR'
37-
- 'SWPM10SP35_6-70002492.SAR'
38-
- 'igsexe_12-80003246.sar' # IGS 7.53
39-
- 'igshelper_17-10010245.sar'
40-
- 'SAPEXE_800-80002630.SAR' # Kernel Part I (753)
41-
- 'SAPEXEDB_800-80002629.SAR' # Kernel Part II (753)
42-
- 'IMDB_CLIENT20_007_26-80002095.SAR'
43-
- 'SAPHOSTAGENT51_51-70002261.SAR'
44-
41+
# Directory for SAP installation media
4542
sap_install_media_detect_directory: "${var.module_var_sap_software_download_directory}"
4643
4744
@@ -93,6 +90,12 @@ sap_hana_install_update_etchosts: 'false'
9390
9491
9592
93+
# ------ Mandatory parameters : SAP SWPM installation using Defaults Templates mode of the Ansible Role ------ #
94+
95+
sap_swpm_ansible_role_mode: default_templates
96+
sap_swpm_templates_product_input: "${var.module_var_sap_swpm_template_selected}"
97+
98+
9699
# ------ Mandatory parameters : SAP SWPM installation using Defaults Templates mode of the Ansible Role ------ #
97100
98101
# Override any variable set in sap_swpm_inifile_dictionary
@@ -112,19 +115,9 @@ sap_swpm_db_sidadm_password: "${var.module_var_sap_swpm_db_sidadm_password}"
112115
sap_swpm_templates_install_dictionary:
113116
114117
sap_ecc6_ehp8_hana_onehost_system_copy:
118+
115119
sap_swpm_product_catalog_id: NW_ABAP_OneHost:BS2016.ERP608.HDB.CP
116-
sap_swpm_inifile_list:
117-
- installation_media
118-
- installation_media_swpm1
119-
- credentials
120-
- db_hana_config
121-
- db_hana_restore
122-
- db_hana_nw_connection
123-
- nw_other_config
124-
- nw_central_instance
125-
- nw_instance_config
126-
- nw_ports_config
127-
- unix_user
120+
128121
sap_swpm_inifile_dictionary:
129122
sap_swpm_sid: "${var.module_var_sap_swpm_sid}"
130123
sap_swpm_pas_instance_nr: "${var.module_var_sap_swpm_pas_instance_nr}"
@@ -142,20 +135,52 @@ sap_swpm_templates_install_dictionary:
142135
#sap_swpm_cd_rdms_path:
143136
sap_swpm_load_type: HBR
144137
138+
sap_swpm_inifile_list:
139+
- installation_media
140+
- installation_media_swpm1
141+
- credentials
142+
- db_hana_config
143+
- db_hana_restore
144+
- db_hana_nw_connection
145+
- nw_other_config
146+
- nw_central_instance
147+
- nw_instance_config
148+
- nw_ports_config
149+
- unix_user
150+
151+
softwarecenter_search_list_x86_64:
152+
- 'SAPCAR_1115-70006178.EXE'
153+
- 'IMDB_SERVER20_059_5-80002031.SAR'
154+
- 'IMDB_LCAPPS_2059_0-20010426.SAR'
155+
- 'IMDB_AFL20_059_0-80001894.SAR'
156+
- 'VCH202000_2059_0-80005463.SAR'
157+
- 'SWPM10SP35_7-20009701.SAR'
158+
- 'igsexe_12-80003187.sar' # IGS 7.53
159+
- 'igshelper_17-10010245.sar'
160+
- 'SAPEXE_800-80002573.SAR' # Kernel Part I (753)
161+
- 'SAPEXEDB_800-80002572.SAR' # Kernel Part II (753)
162+
- 'IMDB_CLIENT20_007_26-80002082.SAR'
163+
- 'SAPHOSTAGENT51_51-20009394.SAR'
164+
165+
softwarecenter_search_list_pc64le:
166+
- 'SAPCAR_1115-70006238.EXE'
167+
- 'IMDB_SERVER20_059_5-80002046.SAR'
168+
- 'IMDB_LCAPPS_2059_0-80002183.SAR'
169+
- 'IMDB_AFL20_059_0-80002045.SAR'
170+
- 'VCH202000_2059_0-80005464.SAR'
171+
- 'SWPM10SP35_7-70002492.SAR'
172+
- 'igsexe_12-80003246.sar' # IGS 7.53
173+
- 'igshelper_17-10010245.sar'
174+
- 'SAPEXE_800-80002630.SAR' # Kernel Part I (753)
175+
- 'SAPEXEDB_800-80002629.SAR' # Kernel Part II (753)
176+
- 'IMDB_CLIENT20_007_26-80002095.SAR'
177+
- 'SAPHOSTAGENT51_51-70002261.SAR'
178+
179+
145180
sap_ecc6_ehp7_hana_onehost_system_copy:
181+
146182
sap_swpm_product_catalog_id: NW_ABAP_OneHost:BS2013SR2.ERP607SR2.HDB.CP
147-
sap_swpm_inifile_list:
148-
- installation_media
149-
- installation_media_swpm1
150-
- credentials
151-
- db_hana_config
152-
- db_hana_restore
153-
- db_hana_nw_connection
154-
- nw_other_config
155-
- nw_central_instance
156-
- nw_instance_config
157-
- nw_ports_config
158-
- unix_user
183+
159184
sap_swpm_inifile_dictionary:
160185
sap_swpm_sid: "${var.module_var_sap_swpm_sid}"
161186
sap_swpm_pas_instance_nr: "${var.module_var_sap_swpm_pas_instance_nr}"
@@ -173,6 +198,46 @@ sap_swpm_templates_install_dictionary:
173198
#sap_swpm_cd_rdms_path:
174199
sap_swpm_load_type: HBR
175200
201+
sap_swpm_inifile_list:
202+
- installation_media
203+
- installation_media_swpm1
204+
- credentials
205+
- db_hana_config
206+
- db_hana_restore
207+
- db_hana_nw_connection
208+
- nw_other_config
209+
- nw_central_instance
210+
- nw_instance_config
211+
- nw_ports_config
212+
- unix_user
213+
214+
softwarecenter_search_list_x86_64:
215+
- 'SAPCAR_1115-70006178.EXE'
216+
- 'IMDB_SERVER20_059_5-80002031.SAR'
217+
- 'IMDB_LCAPPS_2059_0-20010426.SAR'
218+
- 'IMDB_AFL20_059_0-80001894.SAR'
219+
- 'VCH202000_2059_0-80005463.SAR'
220+
- 'SWPM10SP35_7-20009701.SAR'
221+
- 'igsexe_12-80003187.sar' # IGS 7.53
222+
- 'igshelper_17-10010245.sar'
223+
- 'SAPEXE_800-80002573.SAR' # Kernel Part I (753)
224+
- 'SAPEXEDB_800-80002572.SAR' # Kernel Part II (753)
225+
- 'IMDB_CLIENT20_007_26-80002082.SAR'
226+
- 'SAPHOSTAGENT51_51-20009394.SAR'
227+
228+
softwarecenter_search_list_pc64le:
229+
- 'SAPCAR_1115-70006238.EXE'
230+
- 'IMDB_SERVER20_059_5-80002046.SAR'
231+
- 'IMDB_LCAPPS_2059_0-80002183.SAR'
232+
- 'IMDB_AFL20_059_0-80002045.SAR'
233+
- 'VCH202000_2059_0-80005464.SAR'
234+
- 'SWPM10SP35_7-70002492.SAR'
235+
- 'igsexe_12-80003246.sar' # IGS 7.53
236+
- 'igshelper_17-10010245.sar'
237+
- 'SAPEXE_800-80002630.SAR' # Kernel Part I (753)
238+
- 'SAPEXEDB_800-80002629.SAR' # Kernel Part II (753)
239+
- 'IMDB_CLIENT20_007_26-80002095.SAR'
240+
- 'SAPHOSTAGENT51_51-70002261.SAR'
176241
177242
EOF
178243
}

all/ansible_sap_hana_install/ansible_playbook.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,6 @@
33
hosts: all
44
become: true
55

6-
vars:
7-
sap_hostname: "{{ ansible_hostname }}"
8-
sap_domain: "{{ ansible_domain }}"
9-
sap_ip: "{{ ansible_default_ipv4.address }}"
10-
sap_general_preconfigure_modify_etc_hosts: false
11-
sap_general_preconfigure_fail_if_reboot_required: no
12-
sap_hana_preconfigure_fail_if_reboot_required: no
13-
sap_hana_preconfigure_update: yes
14-
sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured: no
15-
16-
collections:
17-
- community.general
18-
- community.sap_launchpad
19-
206
# Use include_role inside Task block, instead of using roles declaration or Task block with import_roles.
217
# This ensures Ansible Roles, and the tasks within, will be parsed in sequence instead of parsing at Playbook initialisation
228
tasks:
@@ -33,7 +19,7 @@
3319
when:
3420
- ansible_architecture == "ppc64le"
3521

36-
- name: update etc hosts
22+
- name: Update etc hosts
3723
lineinfile:
3824
dest: /etc/hosts
3925
line: "{{ ansible_default_ipv4.address }}\t{{ ansible_hostname }}.{{ ansible_domain }}\t{{ ansible_hostname }}"

all/ansible_sap_hana_install/create_ansible_extravars.tf

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,35 @@ resource "local_file" "ansible_extravars" {
55
file_permission = "0755"
66
content = <<EOF
77
8+
# ---- Mandatory parameters : Ansible Defaults ---- #
9+
10+
#ansible_python_interpreter: python3
11+
12+
# Default Ansible Facts populate into default variables for all Ansible Roles
13+
sap_hostname: "{{ ansible_hostname }}"
14+
sap_domain: "{{ ansible_domain }}"
15+
sap_ip: "{{ ansible_default_ipv4.address }}"
16+
17+
18+
19+
# ---- Mandatory parameters : Preconfigure OS for SAP Software ---- #
20+
21+
# Configuration of Ansible Roles for preconfigure SAP (general, hana, netweaver)
22+
sap_general_preconfigure_modify_etc_hosts: false
23+
sap_general_preconfigure_reboot_ok: no
24+
sap_general_preconfigure_fail_if_reboot_required: no
25+
sap_hana_preconfigure_reboot_ok: yes
26+
sap_hana_preconfigure_fail_if_reboot_required: no
27+
sap_hana_preconfigure_update: yes
28+
sap_hana_update_etchosts: yes
29+
30+
31+
32+
# ---- Mandatory parameters : SAP Software installation media downloads ---- #
33+
834
dry_run_test: "${var.module_var_dry_run_test}"
935
36+
# SAP ONE Support Launchpad credentials
1037
suser_id: "${var.module_var_sap_id_user}"
1138
suser_password: '${var.module_var_sap_id_user_password}'
1239
@@ -23,8 +50,6 @@ softwarecenter_search_list_saphana_ppc64le:
2350
- 'IMDB_AFL20_061_2-80002045.SAR'
2451
2552
26-
#ansible_python_interpreter: python3
27-
2853
2954
# ------ Mandatory parameters : SAP HANA installation ------ #
3055
@@ -43,6 +68,7 @@ sap_hana_install_sid: "${var.module_var_sap_hana_install_sid}"
4368
sap_hana_install_instance_number: "${var.module_var_sap_hana_install_instance_number}"
4469
4570
71+
4672
# ------ Optional parameters : SAP HANA installation ------ #
4773
4874
# List of components to be installed, default 'all'

all/ansible_sap_s4hana_install_maintplan/ansible_playbook.yml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,6 @@
33
hosts: all
44
become: true
55

6-
vars:
7-
sap_hostname: "{{ ansible_hostname }}"
8-
sap_domain: "{{ ansible_domain }}"
9-
sap_ip: "{{ ansible_default_ipv4.address }}"
10-
sap_general_preconfigure_modify_etc_hosts: false
11-
sap_general_preconfigure_fail_if_reboot_required: no
12-
sap_hana_preconfigure_fail_if_reboot_required: no
13-
sap_hana_preconfigure_update: yes
14-
sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured: no
15-
16-
collections:
17-
- community.general
18-
- community.sap_launchpad
19-
206
# Use include_role inside Task block, instead of using roles declaration or Task block with import_roles.
217
# This ensures Ansible Roles, and the tasks within, will be parsed in sequence instead of parsing at Playbook initialisation
228
tasks:
@@ -33,7 +19,7 @@
3319
when:
3420
- ansible_architecture == "ppc64le"
3521

36-
- name: update etc hosts
22+
- name: Update etc hosts
3723
lineinfile:
3824
dest: /etc/hosts
3925
line: "{{ ansible_default_ipv4.address }}\t{{ ansible_hostname }}.{{ ansible_domain }}\t{{ ansible_hostname }}"

0 commit comments

Comments
 (0)