Commit graph

24 commits

Author SHA1 Message Date
Michael DeHaan
803ec6cf02 Fixup module docs. 2013-04-05 14:51:08 -04:00
Greg Swift
13238289e4 Extend authorized_keys module for use with alternate AuthorizedKeysFile configurations 2013-03-26 10:12:09 -05:00
Piffey Parlance
0f09e8ba91 * Minor removal of some dumb I did. 2013-02-02 18:17:18 -06:00
Piffey Parlance
cd55d3b6ab * Added support for multi-line key files. 2013-02-02 18:07:10 -06:00
Daniel Hokka Zakrisson
54390d5f21 Add check for multiple keys in one invocation 2013-01-13 15:16:13 +01:00
Stephen Fromm
d8e3a00933 Ensure files created by authorized_key have correct selinux context
Three changes:
* Add set_default_selinux_context() to module_common that sets
  a file's context according to the defaults in the policy
* In atomic_replace(), set the default context for the file if
  selinux is enabled and the destination file does not exist.
* In authorized_key, set the default context when creating
  $HOME/.ssh and $HOME/.ssh/authorized_keys.  If these already
  exist, this won't touch them.
2012-12-13 16:35:49 -08:00
Brian Coca
4e7d3a982a removed env as per project policy
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
2012-11-27 11:18:46 -05:00
Michael DeHaan
6f6559670f chmod -x for all module files in source checkout 2012-11-19 13:47:40 -05:00
Daniel Hokka Zakrisson
1ba31e3c38 Use single-quotes to contain SSH keys as they may contain double-quotes
Fixes #1624.
2012-11-18 18:31:57 +01:00
Stephen Fromm
cbebdf744b Wrap getpwnam in try/except in authorized_key module
This also adds module as an argument to keyfile().
2012-11-07 16:43:09 -08:00
Daniel Hokka Zakrisson
447ea1624a When atomically replacing files, copy attributes 2012-10-25 21:40:05 -04:00
Stephen Fromm
93081eab8e Use shutil.copyfile so as to preserve file ownership in authorized_keys 2012-10-25 11:20:53 -07:00
Stephen Fromm
f70fcf6abb Create temp file in directory where ssh key lives 2012-10-24 20:50:11 -07:00
Stephen Fromm
4bce10c303 Write keys file to temp location to avoid potential corruption 2012-10-24 20:47:45 -07:00
Jan-Piet Mens
d069c57974 Reformat code: examples consistently
- added terse syntax to modules.rst
 - added description of special variables to template module
2012-10-23 15:14:01 +02:00
Michael DeHaan
2d096ea425 Fixing various module related things. 2012-10-02 22:32:17 -04:00
Jan-Piet Mens
c78a0a4a49 Jumbo DOCUMENTATION patch 2012-10-01 09:18:54 +02:00
Jan-Piet Mens
267ada33eb Module DOCUMENTATION: assemble, authorized_key, command, copy
plus a small fix in rst.j2 template
  manpages generated & checked
  modules.html generated & checked
2012-09-28 21:55:49 +02:00
Michael DeHaan
5ed21bf443 whitespace + remove deprecated YAML parser (migration script lives in examples/scripts and warning was added
in 0.6 release)
2012-08-06 20:07:02 -04:00
Michael DeHaan
baacde6c74 Add encoding lines to python modules such that they can take unicode options if they are fed them, since the
AnsibleModule stuff no longer base64 encodes for simplicity and speed reasons.
2012-08-02 21:29:10 -04:00
Michael DeHaan
004c21c913 Convert authorized_key modules to use new common code + misc style things 2012-07-28 17:03:10 -04:00
Brad Olson
9e13c1eab1 Fixes ansible/ansible#522, no longer creates comment in ~/.ssh/authorized_keys, does not create directory or file if state==absent. 2012-07-02 19:16:57 +00:00
Brad Olson
ae5b1191f4 Fixes ansible/ansible#523. Removed 'with:' blocks so module works with Python 2.4 for CentOS 5 support, courtesy of mcodd/ansible@29af24b732. 2012-07-02 17:57:38 +00:00
Brad Olson
f34ebe735e Renamed module, fixed idempotency, removed debug param. 2012-05-30 16:41:38 -04:00