--- - name: Install sudo. apt: name: sudo state: present - name: Create debian user. user: name: debian groups: sudo append: true create_home: yes shell: /bin/bash password: "{{ vault_debian_pass | password_hash('sha512') }}" update_password: on_create - name: Create SSH directory. file: path: /home/debian/.ssh/ state: directory owner: debian group: debian mode: '700' - name: Add authorized SSH keys. copy: src: authorized_keys dest: /home/debian/.ssh/authorized_keys owner: debian group: debian mode: '600' - name: Install networking config file. template: src: interfaces.j2 dest: /etc/network/interfaces.d/eth0 notify: restart networking