From cc275ca2bef047702ee743963d65ba83dd5903b6 Mon Sep 17 00:00:00 2001 From: Joshua Lund Date: Wed, 10 Jul 2013 14:09:03 -0600 Subject: [PATCH] Added a new with_file example to the authorized_key documentation --- library/system/authorized_key | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/library/system/authorized_key b/library/system/authorized_key index ee32839b47..cbed9583b3 100644 --- a/library/system/authorized_key +++ b/library/system/authorized_key @@ -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.