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: with_file:
- public_keys/doe-jane - public_keys/doe-jane
# Copies the key from the user who is running ansible to the remote machine # Copies the key from the user who is running ansible to the remote machine user ubuntu
- set_fact: - authorized_key: user=ubuntu key="{{ lookup('file', lookup('env','HOME') + "/.ssh/id_rsa.pub") }}"
my_ssh_key: "{{ lookup('env','HOME') }}/.ssh/id_rsa.pub" become: yes
- authorized_key: user=ubuntu key="{{ lookup('file', my_ssh_key) }}"
sudo: yes
''' '''