From b82cda646dafeb54f0273976a0f4947c2febdecc Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Fri, 5 Apr 2013 15:33:21 -0400 Subject: [PATCH] Fixup authorized key doc formatting --- library/authorized_key | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/library/authorized_key b/library/authorized_key index 3f0d868b4c..8c1ad520b2 100644 --- a/library/authorized_key +++ b/library/authorized_key @@ -59,16 +59,18 @@ options: required: false choices: [ "present", "absent" ] default: "present" -examples: - - code: 'authorized_key: user=charlie key="ssh-dss ASDF1234L+8BTwaRYr/rycsBF1D8e5pTxEsXHQs4iq+mZdyWqlW++L6pMiam1A8yweP+rKtgjK2httVS6GigVsuWWfOd7/sdWippefq74nppVUELHPKkaIOjJNN1zUHFoL/YMwAAAEBALnAsQN10TNGsRDe5arBsW8cTOjqLyYBcIqgPYTZW8zENErFxt7ij3fW3Jh/sCpnmy8rkS7FyK8ULX0PEy/2yDx8/5rXgMIICbRH/XaBy9Ud5bRBFVkEDu/r+rXP33wFPHjWjwvHAtfci1NRBAudQI/98DbcGQw5HmE89CjgZRo5ktkC5yu/8agEPocVjdHyZr7PaHfxZGUDGKtGRL2QzRYukCmWo1cZbMBHcI5FzImvTHS9/8B3SATjXMPgbfBuEeBwuBK5EjL+CtHY5bWs9kmYjmeo0KfUMH8hY4MAXDoKhQ7DhBPIrcjS5jPtoGxIREZjba67r6/P2XKXaCZH6Fc= charlie@example.org 2011-01-17"' - description: "Example from Ansible Playbooks" - - code: "authorized_key: user=charlie key='$FILE(/home/charlie/.ssh/id_rsa.pub)'" - description: "Shorthand available in Ansible 0.8 and later" - - code: "authorized_key: user=charlie key='$FILE(/home/charlie/.ssh/id_rsa.pub)' sshdir='/etc/ssh/authorized_keys/charlie' manage_dir=no" - description: "Advanced usage with an alternate AuthorizedKeysFile configuration" +description: "Advanced usage with an alternate AuthorizedKeysFile configuration" author: Brad Olson ''' +EXAMPLES = ''' +# Example using key data from a local file on the management machine +authorized_key: user=charlie key='$FILE(/home/charlie/.ssh/id_rsa.pub) + +# Using alternate directory locations: +authorized_key: user=charlie key='$FILE(/home/charlie/.ssh/id_rsa.pub)' sshdir='/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. # # Arguments