--- - name: Mount pseudo filesystems connection: local shell: | ROOTFS_DIR={{ lookup('env', 'ANSIBLE_ROOTFS_DIR') }} 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"