libvirt_cloud/roles/ansible-gentoo_install/tasks/finish.yml

36 lines
807 B
YAML
Raw Normal View History

2023-12-29 19:40:31 +00:00
# -*- mode: yaml; indent-tabs-mode: nil; tab-width: 2; coding: utf-8-unix -*-
---
- name: "DEBUG: ansible-gentoo_install finish.yml"
debug:
verbosity: 1
msg: "DEBUG: ansible-gentoo_install finish.yml"
- name: unmount filesystems
mount:
name: "{{AGI_NBD_MP}}/{{ item }}"
state: unmounted
with_items:
- proc
- sys
- dev/pts
- dev/shm
- dev
- boot
- ''
loop_control:
label: "{{AGI_NBD_MP}}/{{ item }}"
- name: df umount failsafe
shell: |
grep /mnt/gentoo /proc/mounts|tac|while read a b c ;do sudo umount $b;done
grep /mnt/gentoo/ /proc/mounts|tac|while read a b c ;do sudo umount $b;done
# leave this to be done
grep nbd /proc/mounts || true
2023-12-30 22:09:49 +00:00
2023-12-29 19:40:31 +00:00
- name: reboot
command: reboot
async: 0
poll: 0
ignore_errors: true
when: false