From 04fb952d49d7345aea292a41920302fecc2faabc Mon Sep 17 00:00:00 2001 From: Jeff Gonzalez Date: Tue, 27 Jan 2015 15:06:55 -0600 Subject: [PATCH] Added documentation for using url as key source --- lib/ansible/modules/system/authorized_key.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/system/authorized_key.py b/lib/ansible/modules/system/authorized_key.py index 898f74b575b..c5d19521813 100644 --- a/lib/ansible/modules/system/authorized_key.py +++ b/lib/ansible/modules/system/authorized_key.py @@ -37,7 +37,7 @@ options: aliases: [] key: description: - - The SSH public key, as a string + - The SSH public key(s), as a string or url (https://github.com/username.keys) required: true default: null path: @@ -79,6 +79,9 @@ EXAMPLES = ''' # Example using key data from a local file on the management machine - authorized_key: user=charlie key="{{ lookup('file', '/home/charlie/.ssh/id_rsa.pub') }}" +# Using github url as key source +- authorized_key: user=charlie key=https://github.com/charlie.keys + # Using alternate directory locations: - authorized_key: user=charlie key="{{ lookup('file', '/home/charlie/.ssh/id_rsa.pub') }}" @@ -97,6 +100,7 @@ EXAMPLES = ''' - authorized_key: user=charlie key="{{ lookup('file', '/home/charlie/.ssh/id_rsa.pub') }}" key_options='no-port-forwarding,host="10.0.1.1"' + ''' # Makes sure the public key line is present or absent in the user's .ssh/authorized_keys.