25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

21 lines
570 B

  1. ---
  2. - name: Mount pseudo filesystems
  3. connection: local
  4. shell: |
  5. ROOTFS_DIR={{ lookup('env', 'ANSIBLE_ROOTFS_DIR') }}
  6. if grep -q "$(realpath "${ROOTFS_DIR}"/proc)"; then
  7. mount -t proc proc "${ROOTFS_DIR}/proc"
  8. fi
  9. if grep -q "$(realpath "${ROOTFS_DIR}"/dev)"; then
  10. mount --bind /dev "${ROOTFS_DIR}/dev"
  11. fi
  12. if grep -q "$(realpath "${ROOTFS_DIR}"/dev/pts)"; then
  13. mount --bind /dev/pts "${ROOTFS_DIR}/dev/pts"
  14. fi
  15. if grep -q "$(realpath "${ROOTFS_DIR}"/sys)"; then
  16. mount --bind /sys "${ROOTFS_DIR}/sys"
  17. fi