Skip to content

Instantly share code, notes, and snippets.

@rngadam
Created March 19, 2021 14:04
Show Gist options
  • Save rngadam/af11f6cc52943d068a13e7a62c1ab03d to your computer and use it in GitHub Desktop.
Save rngadam/af11f6cc52943d068a13e7a62c1ab03d to your computer and use it in GitHub Desktop.
Example of importing public keys and adding to a generic login user on a machine from ansible
---
# tasks file for ansible-dravedev-developers-ssh
- name: Set up multiple authorized keys
become: yes
become_user: "{{generic_user}}"
tags:
- public_keys
authorized_key:
user: "{{generic_user}}"
state: present
key: "https://github.com/{{item}}.keys"
with_items:
- rngadam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment