File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -140,7 +140,8 @@ or if it will add further hosts to an existing SAP HANA system as specified by v
140140`sap_hana_install_addhosts`. Default is `yes` for a fresh SAP HANA installation.
141141
142142The role can be configured to also set the required firewall ports for SAP HANA. If this is desired, set
143- the variable `sap_hana_install_update_firewall` to `yes` (default is `no`). The firewall ports are defined
143+ the variable `sap_hana_install_update_firewall` to `yes` (default is `no`, that means the role will not touch
144+ any firewall related system settings, leaving whatever the system has unchanged). The firewall ports are defined
144145in a variable which is compatible with the variable structure used by Linux System Role `firewall`.
145146The firewall ports for SAP HANA are defined in member `port` of the first field of variable
146147`sap_hana_install_firewall` (`sap_hana_install_firewall[0].port`), see file `defaults/main.yml`. If the
Original file line number Diff line number Diff line change 11---
22
3- - name : SAP HANA Post Install - Enable and start the firewalld service
4- ansible.builtin.systemd :
5- name : firewalld
6- state : started
7- enabled : yes
8- tags : sap_hana_install_configure_firewall
3+ # Controlled by sap-hana-preconfigure.yaml playbook
4+ # - name: SAP HANA Post Install - Enable and start the firewalld service
5+ # ansible.builtin.systemd:
6+ # name: firewalld
7+ # state: started
8+ # enabled: yes
9+ # tags: sap_hana_install_configure_firewall
910
1011- name : SAP HANA Post Install - Set LogDenied to all in firewalld.conf
1112 ansible.builtin.lineinfile :
Original file line number Diff line number Diff line change 2424 use_connecttimeout : 10
2525 saptune_solution : HANA
2626 cluster_node : true
27+ firewall_cfg : ' ignore'
2728
2829 tasks :
2930 # Ensure required installation of required packages
7576 state : present
7677 when : cluster_node | bool
7778
79+ - name : Validate firewall_cfg:
80+ ansible.builtin.assert :
81+ that :
82+ - firewall_cfg is defined
83+ - firewall_cfg in ['ignore', 'enable', 'disable']
84+ fail_msg : " Variable 'firewall_cfg' must be 'ignore', 'enable' or 'disable'. Found '{{ firewall_cfg }}'"
85+
86+ - name : Set firewall service state and enabled status
87+ ansible.builtin.set_fact :
88+ firewall_service_state : " {{ 'started' if firewall_cfg == 'enable' else 'stopped' }}"
89+ firewall_service_enabled : " {{ 'yes' if firewall_cfg == 'enable' else 'no' }}"
90+
91+ - name : Configure the firewall service state
92+ ansible.builtin.systemd :
93+ name : firewalld
94+ state : " {{ firewall_service_state }}"
95+ enabled : " {{ firewall_service_enabled }}"
96+ when : firewall_cfg != 'ignore'
97+
7898 - name : Configure sapconf based systems
7999 ansible.builtin.include_tasks : ./tasks/sapconf.yaml
80100 when : use_sapconf | bool
You can’t perform that action at this time.
0 commit comments