forked from sap-linuxlab/community.sap_install
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpost_install.yml
More file actions
81 lines (68 loc) · 3.24 KB
/
Copy pathpost_install.yml
File metadata and controls
81 lines (68 loc) · 3.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# SPDX-License-Identifier: Apache-2.0
---
# Installation tasks that can be destructive and should never be executed on existing database.
- name: Block with tasks for new HANA Systems
when:
- not __sap_hana_install_fact_is_installed
# Execute only on main host and skip execution on addhosts.
- __sap_hana_install_fact_is_main_host
block:
- name: SAP HANA - Install - Post-Tasks - Set log_mode
ansible.builtin.include_tasks:
file: post_tasks/log_mode.yml
- name: SAP HANA - Install - Post-Tasks - Apply license
ansible.builtin.include_tasks:
file: post_tasks/license.yml
when: sap_hana_install_apply_license
- name: SAP HANA - Install - Post-Tasks - Recreate the initial tenant database
ansible.builtin.include_tasks:
file: post_tasks/recreate_tenant_database.yml
when: sap_hana_install_recreate_tenant_database | d(true)
- name: SAP HANA - Install - Post-Tasks - Perform an hdblcm installation check
ansible.builtin.include_tasks:
file: post_tasks/check_installation.yml
when: sap_hana_install_check_installation | d(false)
- name: SAP HANA - Install - Post-Tasks - Generate Input File for SAP Application Deployment
'{{ sap_hana_install_nw_input_location }}/{{ sap_hana_install_sid }}.info.nw.install'
ansible.builtin.template:
src: "{{ role_path }}/templates/sap-nw-input.j2"
dest: "{{ sap_hana_install_nw_input_location }}/{{ sap_hana_install_sid }}.info.nw.install"
mode: '0600'
become: false
delegate_to: localhost
vars:
ansible_become: false
# Cleanup extracted software
- name: SAP HANA - Install - Post-Tasks - Deleting software extract directory '{{ sap_hana_install_software_extract_directory }}'
ansible.builtin.file:
path: "{{ sap_hana_install_software_extract_directory }}"
state: absent
when: sap_hana_install_cleanup_extract_directory
- name: SAP HANA - Install - Post-Tasks - Deleting Configfile Directory '{{ sap_hana_install_configfile_directory }}'
ansible.builtin.file:
path: "{{ sap_hana_install_configfile_directory }}"
state: absent
when: sap_hana_install_cleanup_configfile_directory
# Execute on all hosts in play to achieve idempotency.
- name: SAP HANA - Addhosts - Post-Tasks - Set user expiration
ansible.builtin.include_tasks:
file: post_tasks/user_expiration.yml
when:
- sap_hana_install_set_sidadm_noexpire | d(true)
- name: SAP HANA - Install - Post-Tasks - Update hdbuserstore connection details
ansible.builtin.include_tasks:
file: post_tasks/hdbuserstore.yml
- name: SAP HANA - Install - Post-Tasks - SELinux
ansible.builtin.include_tasks:
file: post_tasks/selinux.yml
when: __sap_hana_install_configure_selinux
- name: SAP HANA - Install - Post-Tasks - Fapolicyd
ansible.builtin.include_tasks:
file: post_tasks/fapolicyd.yml
when:
# Ensure fapolicyd is checked only on supported systems.
- ansible_facts['os_family'] == "RedHat"
- __sap_hana_install_configure_fapolicyd
# Added to ensure that fapolicyd is configured only on new installations
# to avoid trusting potentially compromised files in existing installation.
- not __sap_hana_install_fact_is_installed