diff options
author | Yuya Kusakabe <yuya.kusakabe@gmail.com> | 2018-06-21 22:49:37 +0900 |
---|---|---|
committer | Yuya Kusakabe <yuya.kusakabe@gmail.com> | 2018-06-21 22:49:37 +0900 |
commit | e7e91bb0b34568cc3244950739cc207a43009ff3 (patch) | |
tree | 54a428879bc90474f949ab565a3db62af0f658ea /roles/vagrant-libvirt/tasks/unmount.yml | |
parent | dae52d73f6a83eb799aab095952d51439026f3bf (diff) | |
download | vyos-vm-images-e7e91bb0b34568cc3244950739cc207a43009ff3.tar.gz vyos-vm-images-e7e91bb0b34568cc3244950739cc207a43009ff3.zip |
Initial vagrant-libvirt support
Diffstat (limited to 'roles/vagrant-libvirt/tasks/unmount.yml')
-rw-r--r-- | roles/vagrant-libvirt/tasks/unmount.yml | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/roles/vagrant-libvirt/tasks/unmount.yml b/roles/vagrant-libvirt/tasks/unmount.yml new file mode 100644 index 0000000..39c3d52 --- /dev/null +++ b/roles/vagrant-libvirt/tasks/unmount.yml @@ -0,0 +1,66 @@ +# Unmount all mounts +# If remove unmounted before absent, cannot unmount INSTALL_ROOT... +- name: Unmount {{ INSTALL_ROOT }}/boot + mount: + name: "{{ INSTALL_ROOT }}/boot" + src: "{{ WRITE_ROOT }}" + fstype: none + state: unmounted + +- name: Unmount {{ INSTALL_ROOT }}/boot + mount: + name: "{{ INSTALL_ROOT }}/boot" + src: "{{ WRITE_ROOT }}" + fstype: none + state: absent + +- name: Unmount {{ INSTALL_ROOT }}/sys, {{ INSTALL_ROOT }}/proc, {{ INSTALL_ROOT }}/dev + mount: + name: "{{ INSTALL_ROOT }}/{{ item }}" + src: "/{{ item }}" + fstype: none + state: unmounted + with_items: [ 'sys', 'proc', 'dev' ] + +- name: Unmount {{ INSTALL_ROOT }}/sys, {{ INSTALL_ROOT }}/proc, {{ INSTALL_ROOT }}/dev + mount: + name: "{{ INSTALL_ROOT }}/{{ item }}" + src: "/{{ item }}" + fstype: none + state: absent + with_items: [ 'sys', 'proc', 'dev' ] + +- name: Unmount {{ INSTALL_ROOT }} + mount: + name: "{{ INSTALL_ROOT }}" + src: overlayfs + fstype: overlayfs + state: absent + +- name: Unmount {{ READ_ROOT }} + mount: + name: "{{ READ_ROOT }}" + src: "{{ WRITE_ROOT }}/boot/{{ version_string.stdout }}/{{ version_string.stdout }}.squashfs" + fstype: squashfs + state: absent + +- name: Unmount {{ WRITE_ROOT }} + mount: + name: "{{ WRITE_ROOT }}" + src: "{{ loopback.stdout }}" + fstype: "{{ ROOT_FSTYPE }}" + state: absent + +- name: Unmount {{ CD_SQUASH_ROOT }} + mount: + name: "{{ CD_SQUASH_ROOT }}" + src: "{{ SQUASHFS_IMAGE }}" + fstype: squashfs + state: absent + +- name: Unmount {{ CD_ROOT }} + mount: + name: "{{ CD_ROOT }}" + src: "{{ vyos_iso_local }}" + fstype: iso9660 + state: absent |