fix fedora boot issue

This commit is contained in:
2024-04-17 06:02:32 +02:00
parent fe43bf6733
commit ec6ca49265
3 changed files with 27 additions and 6 deletions

View File

@@ -167,5 +167,14 @@
validate: /usr/sbin/visudo --check --file=%s
- name: Fix SELinux
when: os | lower in ['almalinux', 'fedora', 'rhel8', 'rhel9', 'rocky']
command: touch /mnt/.autorelabel
block:
- name: Relabel the filesystem
when: os | lower in ['almalinux', 'rhel8', 'rhel9', 'rocky']
command: touch /mnt/.autorelabel
- name: Disable SELinux
when: os | lower == "fedora"
lineinfile:
path: /mnt/etc/selinux/config
regexp: '^SELINUX='
line: 'SELINUX=permissive'