Skip to content

Instantly share code, notes, and snippets.

@bcoca
Created January 14, 2015 14:44
Show Gist options
  • Save bcoca/b2d426d5fa1f31505e47 to your computer and use it in GitHub Desktop.
Save bcoca/b2d426d5fa1f31505e47 to your computer and use it in GitHub Desktop.
- name: Collect public key
slurp: src="/var/lib/postgresql/.ssh/id_rsa.pub"
register: mykey
-
- name: Setup ssh keys
authorized_key: key="{{mykey.content.decode('base64')}}" user="backup"
delegate_to: "{{item}}"
with_items: groups['backup']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment