- hosts: localhost tasks: - name: Add user user: name: "{{ username }}" shell: "{{ shell | default('/bin/bash') }}" generate_ssh_key: yes