Commit graph

22 commits

Author SHA1 Message Date
Toshio Kuratomi
93d02189f6 Remove duplicate documentation fields 2016-01-28 09:24:20 -08:00
Brian Coca
660b47f62d minor doc fixes and reformating
updated validate_certs feature to be 2.1
2015-11-27 09:28:50 -08:00
Veaceslav (Slava) Mindru
19abe233fe Squashed commit of the following:
commit 406214fad214359fcf13fe8c7cd3f8f8faac5386
commit 85d1c9b0a41dd075eb2683b1a7de595ca3119614
commit 4aa5049b5ae25dee71a248238201611a466a13c4
commit 65a96974c80aea1fef88d78e218ecb665d8113e1
commit 22ea5863d1dfd628735b46cc7de51c0fd33251de

Refactoring
2015-11-26 08:48:42 -05:00
Greg DeKoenigsberg
a76184ad1f @bradobro stepping down as maintainer 2015-10-28 14:39:20 -04:00
Marius Gedminas
5595a9f81d authorized_key: fix example in documentation
'key=' cannot be pointing to a file name; it needs to be the key itself as a string (or a URL).
2015-08-31 09:08:35 +03:00
Simon Li
428550e179 Don't fail in check_mode if user exists
PR #1651 fixed issue #1515 but the requirement for path to be defined is unecessarily strict. If the user has previously been created a path isn't necessary.
2015-08-21 17:55:28 +01:00
Александр Костырев
31ec203583 Fix documentation of authorized_key.py
man for sshd http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man8/sshd.8?query=sshd
says there's no "host" option but "from".
2015-08-17 18:00:04 +03:00
Toshio Kuratomi
1dc5074602 Merge pull request #1651 from verm666/issue-1515
fix authorized_keys in check_mode
2015-07-01 07:52:48 -07:00
verm666
b00b3f2b3c fix authorized_keys in check_mode
This change is in response to issue #1515.
Original pull request #1580.

The original problem is: in authorized_key module you have no idea about users
which will be created by Ansible at first run. I can propose next two ways to
solve this problem:

  1. Combine modules system/user.py and system/authorized_key.py in one module
     (so you will know everything about users in that module)
  2. Use small workaround: add my commit and always provide 'path' parameter
     for authorized_key module during runs with --check option.
2015-07-01 07:04:45 -07:00
Brian Coca
6f6d7f5c18 updated docs to clarify use of exclusive 2015-06-27 00:10:45 -04:00
Greg DeKoenigsberg
2a5f0bde87 Proper author info for all remaining modules 2015-06-15 15:53:30 -04:00
Sam Thursfield
60397fae0f Fix authorized_key module crashing when given an invalid key
I tried a playbook with the following (accidentally wrong) task:

  tasks:
      - name: authorized key test
        authorized_key: key=/home/sam/.ssh/id_rsa.pub key_options='command="/foo/bar"' user=sam

I got the following traceback:

    TASK: [authorized key test] ***************************************************
    failed: [localhost] => {"failed": true, "parsed": false}
    Traceback (most recent call last):
    File "/home/sam/.ansible/tmp/ansible-tmp-1427110003.65-277897441194582/authorized_key", line 2515, in <module>
        main()
    File "/home/sam/.ansible/tmp/ansible-tmp-1427110003.65-277897441194582/authorized_key", line 460, in main
        results = enforce_state(module, module.params)
    File "/home/sam/.ansible/tmp/ansible-tmp-1427110003.65-277897441194582/authorized_key", line 385, in enforce_state
        parsed_new_key = (parsed_new_key[0], parsed_new_key[1], parsed_options, parsed_new_key[3])
    TypeError: 'NoneType' object has no attribute '__getitem__'

With this fix, I see the expected error instead:

    TASK: [authorized key test] ***************************************************
    failed: [localhost] => {"failed": true}
    msg: invalid key specified: /home/sam/.ssh/id_rsa.pub
2015-03-23 11:51:49 +00:00
Dag Wieers
0a91ace6ad Update authorized_key.py
Fix a (common) error in the examples. This is something that may go unnoticed during troubleshooting when copy&pasting the example.
2015-03-05 11:42:34 +01:00
Edward Larkey
4db27877bf Fix typo in authorized key module documentation.
Added opening double quote
2015-02-25 09:00:31 -06:00
Brian Coca
55b06568b0 added note that url src is only avaialable from 1.9 on 2015-02-12 09:31:45 -05:00
Toshio Kuratomi
b84f566ee7 Tabs to spaces 2015-02-11 14:05:49 -08:00
Jesse Keating
e0c5b4340d Add exclusive option to authorized_keys
This option allows the module to ensure that ONLY the specified keys
exist in the authorized_keys file. All others will be removed. This is
quite useful when rotating keys and ensuring no other key will be
accepted.
2015-02-09 17:05:38 -08:00
Jeff Gonzalez
27c046ae79 Refactored code to use module utility fetch_url function. 2015-02-03 19:08:23 -06:00
Jeff Gonzalez
e9ae165792 Added documentation for using url as key source 2015-01-27 15:06:55 -06:00
Jeff Gonzalez
54214f83b5 Added ability to use url as key source 2014-12-22 18:22:31 -06:00
Fabrice Bernhard
1ef8c26c0e Typo in comments
Credit goes to @kbsali 
@pborreli : you did not see that one? :-)
2014-11-27 12:36:34 +01:00
Michael DeHaan
c8e1a2077e file extensions! 2014-09-26 10:37:56 -04:00
Renamed from system/authorized_key (Browse further)