Commit Graph

28 Commits (958d894c6119cee6a976c5663156ee789bfcf239)

Author SHA1 Message Date
Ali Ok ab55355b00 Fix minor syntax error in authorized_key module doc (#4491) 8 years ago
Marcos Diez f7558164b5 better authorized_keys documentation (#3739) 8 years ago
Allen Sanabria 343c3ecfb9 Fixes #1715 Allow authorized_module accept multi. (#3573)
This will allow the authorized_module to accept options that can be
passed multiple times into ssh options. For instance permitopen.
8 years ago
Marcos Diez 873a7435df Added one extra example in the authorized_key module. (#3637) 8 years ago
Michael Scherer f41a90eae4 Port authorized_keys to a syntax compatible with python3 and 2.4 (#3677) 8 years ago
Brian Coca 4549ea5e85 removed incorrect defaults from docs 9 years ago
Toshio Kuratomi 93d02189f6 Remove duplicate documentation fields 9 years ago
Brian Coca 660b47f62d minor doc fixes and reformating
updated validate_certs feature to be 2.1
9 years ago
Veaceslav (Slava) Mindru 19abe233fe Squashed commit of the following:
commit 406214fad214359fcf13fe8c7cd3f8f8faac5386
commit 85d1c9b0a41dd075eb2683b1a7de595ca3119614
commit 4aa5049b5ae25dee71a248238201611a466a13c4
commit 65a96974c80aea1fef88d78e218ecb665d8113e1
commit 22ea5863d1dfd628735b46cc7de51c0fd33251de

Refactoring
9 years ago
Greg DeKoenigsberg a76184ad1f @bradobro stepping down as maintainer 9 years ago
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).
9 years ago
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.
9 years ago
Александр Костырев 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".
9 years ago
Toshio Kuratomi 1dc5074602 Merge pull request #1651 from verm666/issue-1515
fix authorized_keys in check_mode
9 years ago
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.
9 years ago
Brian Coca 6f6d7f5c18 updated docs to clarify use of exclusive 9 years ago
Greg DeKoenigsberg 2a5f0bde87 Proper author info for all remaining modules 9 years ago
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
10 years ago
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.
10 years ago
Edward Larkey 4db27877bf Fix typo in authorized key module documentation.
Added opening double quote
10 years ago
Brian Coca 55b06568b0 added note that url src is only avaialable from 1.9 on 10 years ago
Toshio Kuratomi b84f566ee7 Tabs to spaces 10 years ago
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.
10 years ago
Jeff Gonzalez 27c046ae79 Refactored code to use module utility fetch_url function. 10 years ago
Jeff Gonzalez e9ae165792 Added documentation for using url as key source 10 years ago
Jeff Gonzalez 54214f83b5 Added ability to use url as key source 10 years ago
Fabrice Bernhard 1ef8c26c0e Typo in comments
Credit goes to @kbsali 
@pborreli : you did not see that one? :-)
10 years ago
Michael DeHaan c8e1a2077e file extensions! 10 years ago