Use single-quotes to contain SSH keys as they may contain double-quotes

Fixes #1624.
This commit is contained in:
Daniel Hokka Zakrisson 2012-11-18 18:14:17 +01:00
parent 11175781b8
commit b95bcf1b9d
2 changed files with 2 additions and 2 deletions

View file

@ -402,7 +402,7 @@ This syntax will remain in future versions, though we will also will provide way
is an example using the authorized_key module, which requires the actual text of the SSH key as a parameter:: is an example using the authorized_key module, which requires the actual text of the SSH key as a parameter::
tasks: tasks:
- authorized_key name=$item key="$FILE('/keys/$user1')" - authorized_key name=$item key='$FILE(/keys/$item)'
with_items: with_items:
- pinky - pinky
- brain - brain

View file

@ -49,7 +49,7 @@ options:
examples: 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"' - 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" description: "Example from Ansible Playbooks"
- code: "authorized_key: user=charlie key=$FILE(/home/charlie/.ssh/id_rsa.pub)" - code: "authorized_key: user=charlie key='$FILE(/home/charlie/.ssh/id_rsa.pub)'"
description: "Shorthand available in Ansible 0.8 and later" description: "Shorthand available in Ansible 0.8 and later"
author: Brad Olson author: Brad Olson
''' '''