--- - name: Umount pseudo filesystems connection: local shell: umount -l '{{ lookup('env', 'ANSIBLE_ROOTFS_DIR') }}{{ item }}' with_items: - /proc - /dev/pts - /dev - /sys