Skip to content

Instantly share code, notes, and snippets.

@mrlesmithjr
Created August 2, 2017 05:27
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
---
_ssh_keys_distribution:
{% for host in play_hosts %}
- host: '{{ host }}'
keys:
{% for _keys in hostvars[host]['_ssh_pub_key']['results'] %}
- user: '{{ _keys['item'] }}'
key: '{{ _keys['stdout'] }}'
{% endfor %}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment