diff --git a/roles/cleanup/tasks/main.yml b/roles/cleanup/tasks/main.yml index 258517d..a796f95 100644 --- a/roles/cleanup/tasks/main.yml +++ b/roles/cleanup/tasks/main.yml @@ -1,4 +1,10 @@ --- +- name: Unmount /mnt recursively + when: os not in ['rhel8', 'rhel9'] + ansible.builtin.command: umount -R /mnt + changed_when: result.rc == 0 + register: result + - name: Setup Cleanup when: hypervisor == "proxmox" delegate_to: localhost diff --git a/roles/partitioning/tasks/main.yml b/roles/partitioning/tasks/main.yml index 66b6933..8668434 100644 --- a/roles/partitioning/tasks/main.yml +++ b/roles/partitioning/tasks/main.yml @@ -107,10 +107,10 @@ - name: Mount filesystems block: - name: Mount filesystems and subvolumes - when: + when: - cis | bool or (not cis and (item.path == '/var/log' and filesystem == 'btrfs') or (item.path not in ['/home', '/var', '/var/log', '/var/log/audit'])) - - not (item.path == '/swap' and filesystem != 'btrfs') + - not (item.path == '/swap' and filesystem != 'btrfs') ansible.posix.mount: path: /mnt{{ item.path }} src: "{{ 'UUID=' + (main_uuid.stdout if filesystem == 'btrfs' else item.uuid) }}"