---
- name: Add or update the existing user on Ubuntu servers
  hosts: server
  sudo: yes
  roles:
    - user

  vars_prompt:
    - name: "username"
      prompt: "New username"
      private: no

    - name: "password"
      prompt: "New password"
      encrypt: "md5_crypt"
      salt_size: 7
      confirm: yes

    - name: "id_rsa_path"
      prompt: "SSH public key path"
      default: "~/.ssh/id_rsa.pub"
      private: no

    - name: "sudoers"
      prompt: "Add user to `sudoers` group (yes/no)"
      default: "no"
      private: no

---
- name: Add or update the existing user on Ubuntu servers
  hosts: server
  sudo: yes
  roles:
    - user

  vars_prompt:
    - name: "username"
      prompt: "New username"
      private: no

    - name: "password"
      prompt: "New password"
      encrypt: "sha512_crypt"
      confirm: yes

    - name: "id_rsa_path"
      prompt: "SSH public key path"
      default: "~/.ssh/id_rsa.pub"
      private: no

    - name: "sudoers"
      prompt: "Add user to `sudoers` group (yes/no)"
      default: "no"
      private: no

Switch from `md5_crypt` to `sha512_crypt` for better security
Switch from `md5_crypt` to `sha512_crypt` for better security

See: https://pythonhosted.org/passlib/lib/passlib.hash.md5_crypt.html
