Ver código fonte

Mount

next_step
Luigi Cruz 3 anos atrás
pai
commit
47af9b546e
1 arquivos alterados com 4 adições e 16 exclusões
  1. +4
    -16
      ansible/tasks/mount.yaml

+ 4
- 16
ansible/tasks/mount.yaml Ver arquivo

@@ -3,19 +3,7 @@
connection: local
shell: |
ROOTFS_DIR={{ lookup('env', 'ANSIBLE_ROOTFS_DIR') }}

if grep -q "$(realpath "${ROOTFS_DIR}"/proc)"; then
mount -t proc proc "${ROOTFS_DIR}/proc"
fi

if grep -q "$(realpath "${ROOTFS_DIR}"/dev)"; then
mount --bind /dev "${ROOTFS_DIR}/dev"
fi
if grep -q "$(realpath "${ROOTFS_DIR}"/dev/pts)"; then
mount --bind /dev/pts "${ROOTFS_DIR}/dev/pts"
fi

if grep -q "$(realpath "${ROOTFS_DIR}"/sys)"; then
mount --bind /sys "${ROOTFS_DIR}/sys"
fi
mount -t proc proc "${ROOTFS_DIR}/proc"
mount --bind /dev "${ROOTFS_DIR}/dev"
mount --bind /dev/pts "${ROOTFS_DIR}/dev/pts"
mount --bind /sys "${ROOTFS_DIR}/sys"

Carregando…
Cancelar
Salvar