- name: create user
  user:
    name: "{{ item }}"
    state: present
    groups: [ sudo ]
    create_home: yes
    shell: /bin/bash
  with_items:
    - norbey
    - mike

- name: add key
  authorized_key:
    user: "{{ item.name }}"
    key: "{{ item.key }}"
  with_items:
    - name: norbey
      key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEeaa9d1+v//m+n5FxHgq57I+oPAjLhXIG4WtZejLq2v norbey@lego
    - name: mike
      key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBVHRlgZ+UTSBCChrpYTzOhLek9r9CcoNPoE2EcFXvz0 mike@curiosity

- name: create user
  user:
    name: "{{ item }}"
    state: present
    groups: [ sudo ]
    create_home: yes
    shell: /bin/bash
    password: "$6$gbrioghz8hgegnwe$W6hvaazHFUDwHLOE501ml7FD5vuKPgwlvuG3v2ZJcgYOwj1ohw2T3bBCUL96N1aiKlqE9Wg//Z4na.RqgCGYk1"
  with_items:
    - kepzodo
