-
Notifications
You must be signed in to change notification settings - Fork 64
sap_hana_install: simplified and more flexible SELinux and fapolicyd handling #1136
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
Merged
berndfinger
merged 14 commits into
sap-linuxlab:dev
from
berndfinger:combine-selinux-and-fapolicyd-dir-definitions-02
Dec 3, 2025
Merged
Changes from 13 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
f86320b
sap_hana_install: SELinux and fapolicyd handling
berndfinger 1f636fc
sap_hana_install: Fix ansible-lint
berndfinger 5ff835a
sap_hana_install: Fix codespell
berndfinger ba6457c
sap_hana_install: Add assertion for sap_hana_install_directories
berndfinger bf75243
sap_hana_install: use only a list of dicts for selinux_fcontexts
berndfinger ed3b4ee
sap_hana_install: Rename sap_hana_install_use_fapolicyd
berndfinger 1cebedd
sap_hana_install: Rename sap_hana_install_modify_selinux_labels
berndfinger 261da32
sap_hana_install: Further improvements
berndfinger c4ea37d
sap_hana_install: Remove superfluous when condition
berndfinger 1e6a660
sap_hana_install: Further improvements
berndfinger 4798277
sap_hana_preconfigure: No longer mention ssh in debug message
berndfinger 0235088
sap_hana_preconfigure: Prioritize old selinux and faplicyd vars
berndfinger b71a371
sap_hana_install: Fix linting error
berndfinger 47899df
sap_hana_preconfigure: Fix some typos
berndfinger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,24 @@ | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| --- | ||
|
|
||
| # This configuration includes also Pre-Tasks content to ensure they are all set same. | ||
| - name: SAP HANA - Post-Tasks - Configure 'sap_hana_install_root_path' SELinux file contexts | ||
| # We do not need to configure sap_hana_install_root_path here because that was already configured in Pre-Tasks. | ||
| - name: SAP HANA - Post-Tasks - Define dict for selinux_fcontexts | ||
| ansible.builtin.set_fact: | ||
| __sap_hana_install_fcontexts_list: "{{ __sap_hana_install_fcontexts_list | d([]) + [__sap_hana_install_target_setype_dict] }}" | ||
| loop: "{{ sap_hana_install_directories | reject('equalto', sap_hana_install_root_path) }}" | ||
| loop_control: | ||
| loop_var: __sap_hana_install_directory_item | ||
| vars: | ||
| __sap_hana_install_target_setype_dict: | ||
| target: "{{ __sap_hana_install_directory_item }}(/.*)?" | ||
| setype: 'usr_t' | ||
|
|
||
| - name: SAP HANA - Post-Tasks - Configure SELinux file contexts for the remaining directories | ||
| ansible.builtin.include_role: | ||
| name: '{{ sap_hana_install_system_roles_collection }}.selinux' | ||
| vars: | ||
| selinux_booleans: | ||
| - { name: 'selinuxuser_execmod', state: 'on' } | ||
| selinux_fcontexts: | ||
| - { target: '{{ sap_hana_install_root_path }}(/.*)?', setype: 'usr_t' } | ||
| - { target: '/usr/sap(/.*)?', setype: 'usr_t' } | ||
| selinux_fcontexts: "{{ __sap_hana_install_fcontexts_list }}" | ||
| selinux_restore_dirs: | ||
| - '{{ sap_hana_install_root_path }}' | ||
| - /usr/sap | ||
| - "{{ sap_hana_install_directories | reject('equalto', sap_hana_install_root_path) }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.