--- - name: install needed packages apt: name: - libpam-mount - cifs-utils - sshfs state: latest - name: configure pam_mount blockinfile: dest: /etc/security/pam_mount.conf.xml block: | rootansibleDebian-gdmvirti rootansibleDebian-gdmvirti rootansibleDebian-gdmvirti insertafter: "" - name: make sure .ssh exists file: path: /root/.ssh state: directory mode: '0700' - name: provide public key of home server lineinfile: path: /root/.ssh/known_hosts line: "{{ ssh_hostkey }}" create: yes