Created
January 8, 2018 07:57
-
-
Save jas02/cb10fd790100e4e026f355833e520aa0 to your computer and use it in GitHub Desktop.
Revisions
-
jas02 created this gist
Jan 8, 2018 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ - name: fetch all servers id_rsa.pub file content shell: cat ~/.ssh/id_rsa.pub register: ssh_keys - name: make sure all ssh keys are in authorized_keys authorized_key: user: root key: "{{ item[0] }}" delegate_to: "{{ item[1] }}" with_nested: - "{{ ssh_keys.stdout }}" - "{{groups['openshift']}}"