---

- name: directory to hold public keys
  file: state=directory path=/tmp/pubkeys mode=0755

- name: fetch public keys from github
  get_url: dest=/tmp/pubkeys/{{ item }}-pubkeys url=https://github.com/{{ item }}.keys
  with_items: github_usernames

- name: assemble the authorized keys file
  assemble: dest=/root/.ssh/authorized_keys mode=0600 src=/tmp/pubkeys

---

- name: directory to hold public keys
  file: state=directory path=/tmp/pubkeys mode=0755

- name: fetch public keys from github
  get_url: dest=/tmp/pubkeys/{{ item }}-pubkeys url=https://github.com/{{ item }}.keys
  with_items: github_usernames

- name: assemble the authorized keys file
  assemble: dest=/home/core/.ssh/authorized_keys mode=0600 src=/tmp/pubkeys

Drop SSH keys into /home/core, not /root!
Drop SSH keys into /home/core, not /root!
