- name: "install passwd"
  include_role:
    name: yum_apt_retry
  vars:
    package:
      - passwd
    creates:
      - /usr/bin/passwd
- shell: sudo su - {{ site }} -c "mkdir -p .ssh && chmod 700 .ssh && ssh-keygen -t ed25519 -f .ssh/id_ed25519 -N '' && cp .ssh/id_ed25519.pub .ssh/authorized_keys && chmod 600 .ssh/authorized_keys"
- name: create .ssh/config
  copy:
    content: "Host *\n  StrictHostKeyChecking no\n  UserKnownHostsFile /dev/null\n  LogLevel QUIET\n"
    dest: /omd/sites/{{ site }}/.ssh/config
    owner: "{{ site }}"
    group: "{{ site }}"
    mode: 0600
- shell: "echo 'demo' | passwd --stdin {{ site }}"
