Commit graph

34 commits

Author SHA1 Message Date
Laurens Van Houtven
80e2c597a8 Support ssh-ed25519 keys
The newest version of OpenSSH supports a new, wonderful key type. authorized_key incorrectly discards pubkeys of this type as busted because it doesn't recognize type signature.
2014-02-28 18:46:54 +01:00
kustodian
a7839208c7 Updated authorized_key module documentation regarding manage_dir
Added a warning in the documentation about manage_dir when selecting an alternate directory for authorized_keys
2014-01-29 23:39:43 +01:00
Scott Gilbert
0aedd0c0b2 Allow keystring passed to authorized_key to contain blank lines and comments 2014-01-16 12:14:37 -06:00
James Tanner
2c39576e80 Remove unused variable from authorized_key 2014-01-16 11:46:06 -05:00
James Tanner
e22af253bb Fixes #5486 Keep authorized key options in tact and ordered 2014-01-15 17:10:10 -05:00
jctanner
872a1ee39b Merge pull request #5107 from maetthu/devel
authorized_key module: rewrite options to dict parser, fixes #5032
2013-12-02 14:02:43 -08:00
James Tanner
ad837709bd Addresses #5023 Fix import comments 2013-12-02 15:13:49 -05:00
James Tanner
6000d636b3 Fixes #5023 Convert all modules to use new snippet import pattern 2013-12-02 15:11:23 -05:00
Matthias Blaser
9d442243ab rewrite options to dict parser, fixes #5032 2013-11-30 09:03:35 +01:00
Michael DeHaan
36effd237c There's a cleaner way to do this, commit to module formatter pending.
Revert "No longer need to reference 'version_added' in docs for these, as this was quite a while ago."

This reverts commit ff0a41d446.
2013-11-27 21:23:03 -05:00
Michael DeHaan
ff0a41d446 No longer need to reference 'version_added' in docs for these, as this was quite a while ago. 2013-11-27 21:19:32 -05:00
James Tanner
7be13faae8 Fix comment yaml escaping in authorized_key module 2013-11-26 08:54:19 -05:00
James Tanner
4ba51eef6f Save comment hashes in sshkeys 2013-11-25 23:46:48 -05:00
James Tanner
16b22d0d64 Cleanup debug statements 2013-11-25 22:16:04 -05:00
James Tanner
b938554311 Fixes #5032 escape and safely split key options in authorized_keys module 2013-11-25 22:13:42 -05:00
James Tanner
32986c4d64 Fixes #5021 safely split hostkeys with quotes 2013-11-22 16:36:31 -05:00
James Cammarata
0e9184eefd Fixing authorized_keys module to make the key part detection better
Fixes #4677
Fixes #4657
Fixes #4599
2013-10-28 13:52:45 -05:00
James Cammarata
aa0577c211 Merge branch 'fix_autorized_keys' of https://github.com/mscherer/ansible into mscherer-fix_autorized_keys 2013-10-24 20:13:38 -05:00
James Cammarata
b58b287fce Fixing up authorized_keys to accept comments with spaces 2013-10-24 20:12:56 -05:00
Michael Scherer
951a91723d make sure that options are quoted, as people can add a shell
script there with a comma that would produce invalid configuration
upon being wrote again
2013-10-24 23:51:55 +02:00
Michael Scherer
7672e9fef8 sort the option_key to have a constant predictable line 2013-10-24 23:47:34 +02:00
Michael Scherer
264945a1f7 adding a single comma at the end of the options list confuse the module
it start to duplicate line, because this create
a empty option in the list, and so the module add a new line along the previous
one. See

>>> ' a,b, '.strip().split(',')
['a', 'b', '']
2013-10-24 23:46:49 +02:00
jctanner
7e8e186b3b Merge pull request #4517 from adfinis-sygroup/devel
Remove keys regardless of the options
2013-10-16 17:40:43 -07:00
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
2013-10-15 09:05:50 -05:00
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
2013-10-15 15:29:52 +02:00
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
2013-10-15 15:29:47 +02:00
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
2013-10-11 16:22:37 -05:00
David Minor
ed7d3f92a0 Add ssh key options parameter to authorized_key module 2013-10-11 16:22:37 -05:00
Joshua Lund
cc275ca2be Added a new with_file example to the authorized_key documentation 2013-07-10 14:09:03 -06:00
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
2013-06-15 20:54:25 +02:00
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
2013-06-07 15:43:42 -06:00
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.
2013-05-30 16:16:14 -04:00
Oleg
3531fbdb29 fix for authorized_key: skip chown and chmod if authorized_key_file is link 2013-05-08 01:47:41 +02:00
Michael DeHaan
391fb98ee2 Allow modules to be categorized, and also sort them when generating the documentation. 2013-04-28 15:03:45 -04:00
Renamed from library/authorized_key (Browse further)