Add umount for non RHEL systems
This commit is contained in:
parent
d97f0cfff8
commit
cb3f36a040
@ -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
|
- name: Setup Cleanup
|
||||||
when: hypervisor == "proxmox"
|
when: hypervisor == "proxmox"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
|
@ -107,10 +107,10 @@
|
|||||||
- name: Mount filesystems
|
- name: Mount filesystems
|
||||||
block:
|
block:
|
||||||
- name: Mount filesystems and subvolumes
|
- name: Mount filesystems and subvolumes
|
||||||
when:
|
when:
|
||||||
- cis | bool or (not cis and (item.path == '/var/log' and filesystem == 'btrfs')
|
- 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']))
|
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:
|
ansible.posix.mount:
|
||||||
path: /mnt{{ item.path }}
|
path: /mnt{{ item.path }}
|
||||||
src: "{{ 'UUID=' + (main_uuid.stdout if filesystem == 'btrfs' else item.uuid) }}"
|
src: "{{ 'UUID=' + (main_uuid.stdout if filesystem == 'btrfs' else item.uuid) }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user