Created
January 27, 2020 20:03
-
-
Save mowings/fd9abd6144d8c11e80fbce9ee4b8ec7e to your computer and use it in GitHub Desktop.
Ansible -- add a bunch of public keys in a directory to a remote user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Add keys to hosts | |
hosts: all | |
become: true | |
tasks: | |
- name: add keys | |
authorized_key: | |
user: ubuntu | |
state: present | |
key: "{{item}}" | |
with_file: | |
- keys/mary.pub | |
- keys/joe.pub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment