Commit Graph

12 Commits (f61a4c1eb314f5f17df4f14c45bd6ba1edcc074a)

Author SHA1 Message Date
jctanner 7e8e186b3b Merge pull request #4517 from adfinis-sygroup/devel
Remove keys regardless of the options
11 years ago
James Cammarata 35284818a9 Handle ssh key files that may only have a type/key specified
If a specified key did not have a comment, it would be ignored as
an invalid key.

Fixes #4513
11 years ago
Stefan Heinemann af704562a9 Set the options of an authorized key comma separated
According to the sshd man page, no spaces are permitted between the
options of an authorized ssh key
11 years ago
Stefan Heinemann 346d46a94c Don't mind the options of a key when removing it
This allows to remove a key without knowing the options in the
authorized_key file
11 years ago
James Cammarata 49130c688d Adding 'unique' option to authorized_key module and cleanup
A small refactoring of the authorized_key module to accomodate these
changes, plus fixing some things like not rewriting the file on every
new key. These changes bring the original feature for ssh options in-
line with the comments in #3798

Fixes #3785
11 years ago
David Minor ed7d3f92a0 Add ssh key options parameter to authorized_key module 11 years ago
Joshua Lund cc275ca2be Added a new with_file example to the authorized_key documentation 11 years ago
Jan-Piet Mens 5c69918d53 DOCS: standardize on EXAMPLES (a.k.a. Docs-JumboPatch JetLag Edition)
Migrated all examples: in DOCUMENTATION=''' string to standalone EXAMPLES=''' string
  Added deprecation warning to moduledev.rst and remove deprecated example from it
  Fixed up a few typos and uppercased some acronyms.
  add consistency to how EXAMPLES are formatted
11 years ago
Joshua Lund 51c7441244 Updates to the authorized_key documentation
* Clarified the meaning of 'user'
* Changed 'sshdir' to 'path' in the example
  * 'sshdir' is used internally in the module, but the argument is 'path'
* Made the capitalization consistent in the descriptions
11 years ago
Lorin Hochstein 8c9cceacbf authorized_key: Set manage_dir default value
This commit fixes a bug where the authorized_key module causes
the ~user/.ssh directory to be owned by root instead of the user,
when the manage_dir argument is not specified.

If the manage_dir argument was not specified, the module behaved as if
manage_dir was set to false, even though it's supposed to default to
true.

This module assumed that an optional argument, with no default
specified, will not be present in the module.params dictionary.

What actually seems to happen is that the argument does appear in
the module.params dictionary with a value of None.

The upside is that this line was evaluating to None instead of
true:

    manage_dir = params.get("manage_dir", True)

I fixed the problem in this particular module by explicitly specifying
the default value for the manage_dir arugment. But if this bug
occurred because of a change in behavior in AnsibleModule, then other
modules may be broken as well.
12 years ago
Oleg 3531fbdb29 fix for authorized_key: skip chown and chmod if authorized_key_file is link 12 years ago
Michael DeHaan 391fb98ee2 Allow modules to be categorized, and also sort them when generating the documentation. 12 years ago