better authorized_keys documentation (#3739)

This commit is contained in:
Marcos Diez 2016-07-12 09:52:00 -03:00 committed by Matt Clay
parent 43ba7f3b3b
commit f10413b919

View file

@ -125,12 +125,9 @@ EXAMPLES = '''
with_file:
- public_keys/doe-jane
# Copies the key from the user who is running ansible to the remote machine
- set_fact:
my_ssh_key: "{{ lookup('env','HOME') }}/.ssh/id_rsa.pub"
- authorized_key: user=ubuntu key="{{ lookup('file', my_ssh_key) }}"
sudo: yes
# Copies the key from the user who is running ansible to the remote machine user ubuntu
- authorized_key: user=ubuntu key="{{ lookup('file', lookup('env','HOME') + "/.ssh/id_rsa.pub") }}"
become: yes
'''