1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #3494 from jlund/authorized-key

Add a new with_file example to the authorized_key documentation
This commit is contained in:
Michael DeHaan 2013-07-11 05:20:24 -07:00
commit e44847e3d6

View file

@ -73,6 +73,14 @@ EXAMPLES = '''
key="{{ lookup('file', '/home/charlie/.ssh/id_rsa.pub') }}"
path='/etc/ssh/authorized_keys/charlie'
manage_dir=no
# Using with_file
- name: Set up authorized_keys for the deploy user
authorized_key: user=deploy
key="{{ item }}"
with_file:
- public_keys/doe-jane
- public_keys/doe-john
'''
# Makes sure the public key line is present or absent in the user's .ssh/authorized_keys.