@ -31,13 +31,13 @@ version_added: "0.5"
options:
options:
user:
user:
description:
description:
- Name of the user who should have access to the remote host
- The username on the remote host whose authorized_keys file will be modified
required: true
required: true
default: null
default: null
aliases: []
aliases: []
key:
key:
description:
description:
- t he SSH public key, as a string
- T he SSH public key, as a string
required: true
required: true
default: null
default: null
path:
path:
@ -55,12 +55,12 @@ options:
version_added: "1.2"
version_added: "1.2"
state:
state:
description:
description:
- w hether the given key should or should not be in the file
- W hether the given key should or should not be in the file
required: false
required: false
choices: [ "present", "absent" ]
choices: [ "present", "absent" ]
default: "present"
default: "present"
description:
description:
- "a dds or removes authorized keys for particular user accounts"
- "A dds or removes authorized keys for particular user accounts"
author: Brad Olson
author: Brad Olson
'''
'''
@ -69,7 +69,7 @@ EXAMPLES = '''
authorized_key: user=charlie key="{{ lookup('file', '/home/charlie/.ssh/id_rsa.pub') }}"
authorized_key: user=charlie key="{{ lookup('file', '/home/charlie/.ssh/id_rsa.pub') }}"
# Using alternate directory locations:
# Using alternate directory locations:
authorized_key: user=charlie key="{{ lookup('file', '/home/charlie/.ssh/id_rsa.pub') }}" sshdir ='/etc/ssh/authorized_keys/charlie' manage_dir=no
authorized_key: user=charlie key="{{ lookup('file', '/home/charlie/.ssh/id_rsa.pub') }}" path ='/etc/ssh/authorized_keys/charlie' manage_dir=no
'''
'''
# Makes sure the public key line is present or absent in the user's .ssh/authorized_keys.
# Makes sure the public key line is present or absent in the user's .ssh/authorized_keys.