aboutsummaryrefslogtreecommitdiff
blob: 439900b08b89c61f7c5b9c826fa84b9ed16c1cc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
---
- name: umount virtual
  #grep -e /mnt/gentoo/sys -e /mnt/gentoo/dev -e /mnt/gentoo/run -e /mnt/gentoo/proc /proc/mounts  |awk '{print $2}' |sort -r |xargs umount
  ansible.builtin.shell: >
    grep {{ [' -e ' | product(ansible_loop.allitems) | map ('join') | list | join(' ') }} /proc/mounts  |awk '{print $2}' |sort -r |xargs umount
  loop:
    - /sys
    - /dev
    - /run
    - /proc
  loop_control:
    extended: true

- name: umount physical
  ansible.builtin.shell: >
    grep /mnt/gentoo /proc/mounts  |awk '{print $2}' |sort -r |xargs --verbose umount
  loop_control:
    extended: true