Commit Graph

129 Commits (3025451b1091adebeefe365655cc84174c0487b3)

Author SHA1 Message Date
Brian Coca 3025451b10 fixed typo EEXISTS is actually EEXIST
fixes #2585
2016-12-08 11:23:50 -05:00
Charles Ferguson 4c93b5dab6 Add documentation to 'file' AnsibleModule definition for internals.
The parameters 'diff_peek' and 'validate' are not expected to be used
by users. They are internal. To make it clear, this change adds the
comments 'Internal use only' to each of those definitions to make
it clear that they are actually used, just not by end-users.
2016-12-08 11:23:50 -05:00
Charles Ferguson e86ba78685 Update documentation for 'file' module to include 'diff_peek'.
The 'diff_peek' option isn't documented at all, and provides a
rudimentary check that the content isn't binary. Documentation is
added to explain the option.

The 'validate' option has a declaration, but isn't implemented.
Therefore it may as well be removed from the module.
2016-12-08 11:23:49 -05:00
Charles Paul 52d499d268 create non-existent ini file
fixing fail_json

more verbose fail msg
2016-12-08 11:23:48 -05:00
Maarten Claes e0b8b0d789 This fixes copy with the remote_src option
It was broken in 6e37f1dcef0 when the remote_src was added. Need to
pass the absolute path to copy2 instead of a tuple.
2016-12-08 11:23:48 -05:00
Brian Coca 139201ad83 fixed remote_src support, now actually copies and does not move 2016-12-08 11:23:48 -05:00
Timothy Appnel f2e83fa452 Added the checksum_algo alias to the stats module. 2016-12-08 11:23:47 -05:00
Ales Nosek 4e787f17cf Make the syntax work with Python 2.4 2016-12-08 11:23:47 -05:00
Ales Nosek bd03dd67ff ini_file should only change what was specified and nothing more #5860
See also:
http://alesnosek.com/blog/2015/08/03/improving-ansibles-ini-file-module/
2016-12-08 11:23:47 -05:00
Brian Coca f7f8df1773 since find doesn't make changes, support check mode and gather data for other tasks in check mode 2016-12-08 11:23:44 -05:00
Toshio Kuratomi a179d06a91 Simplify logic to handle options set to empty string
Fixes #2125
2016-12-08 11:23:44 -05:00
Brian Coca 14455f4acc final form, use_regex now controls if patterns is glob or regex - fixed cases in which stat fails (dangling symlink) - now properly reports name of skipped paths 2016-12-08 11:23:43 -05:00
Brian Coca 3e5dc1fd74 changed so regexes and shell globs work transparently 2016-12-08 11:23:43 -05:00
Ryan Sydnor 8a1c035fac Add capability for stat module to use more hash algorithms
Specifically, the stat module now has a checksum_algorithm parameter.
This lets the module utilize one of the hash algorithms available on the host
to return the checksum of the file.

This change is backwards compatible. The checksum_algorithm defaults to
sha1 and still returns its result to the stat.checksum property.
2016-12-08 11:23:43 -05:00
Brian Coca 7c0dc323a2 corrected docs for stat's lnk_source fixes #12850 2016-12-08 11:23:42 -05:00
Brian Coca baeb6d8dc0 fixed bug in spec 2016-12-08 11:23:42 -05:00
Brian Coca a964754484 added regex support to find, also added 'singular' aliasess to patterns and paths 2016-12-08 11:23:42 -05:00
Brian Coca d6f474761d documented new remote_src option 2016-12-08 11:23:41 -05:00
varnav a05df49998 Fixed confusion in the docs
As 'path' is actually alias for 'dest', this could be confusing.
2016-12-08 11:23:37 -05:00
Toshio Kuratomi 58573187f8 Change the example of rsync_opts to use a list instead of a string
Fixes #9889
2016-12-08 11:23:37 -05:00
James Cammarata 4a4674ca24 Fix syntax error in synchronize docstring 2016-12-08 11:23:36 -05:00
skylerbunny dabf94ab1f Explanation of privilege escalation in notes
An attempt to make clear how privilege escalation works with respect to the src/source host and dest/destination host. One existing note was incorporated into three new ones, iterating each.
2016-12-08 11:23:36 -05:00
Jérémie Astori 6695cc5c21 Fix physical walk on acl module for Linux
`-h` is for BSD [1] while `-P`/`--physical` is for Linux [2].
This commit fixes that option now that acl module is (temporarily)
only supported for Linux.
I will re-add `-h` when fixing BSD support.

[1]: http://www.freebsd.org/cgi/man.cgi?format=html&query=setfacl(1)
[2]: http://linuxcommand.org/man_pages/setfacl1.html
2016-12-08 11:23:33 -05:00
Jérémie Astori 186cc7cb17 Make sure entry is not sent when acl state=query 2016-12-08 11:23:33 -05:00
Jérémie Astori 3568f1cd78 Make sure permission-less entries are accepted when state=absent
Also, remove that try condition as, at that stage, no permissions with
other than 2 or 3 fields are sent to the function.
2016-12-08 11:23:33 -05:00
Jérémie Astori a93445c798 Remove support for `d[efault]:` in entry permissions
It is not documented in [the Ansible doc page][1] nor
[the BSD setfacl man entry][2] (which means it might not be compatible
with BSD) so removing it does not break the API.

On the other hand, it does not conform with POSIX 1003.1e DRAFT
STANDARD 17 according to the [Linux setfacl man entry][3] so safer to
remove.

Finally, the most important reason: in non POSIX 1003.e mode, only ACL
entries without the permissions field are accepted, so having an
optional field here is very much error-prone.

[1]: http://docs.ansible.com/ansible/acl_module.html
[2]: http://www.freebsd.org/cgi/man.cgi?format=html&query=setfacl(1)
[3]: http://linuxcommand.org/man_pages/setfacl1.html
2016-12-08 11:23:33 -05:00
Jérémie Astori 1b34f1a7ac Fix wrong expectation regarding entry format in acl module 2016-12-08 11:23:32 -05:00
Jérémie Astori 6c298e20c0 Fix wrong processing of lines returned by setfacl in test mode 2016-12-08 11:23:32 -05:00
Jérémie Astori 08e8f732c5 Fix minor whitespace issues 2016-12-08 11:23:32 -05:00
Matthias Frey 2ed50d5e5b assemble: add file validation support. 2016-12-08 11:23:31 -05:00
Brian Coca a1992ad890 updated encoding comment and expanded authors field 2016-12-08 11:23:31 -05:00
Jérémie Astori 288a9d8500 Set version number in recursive option description 2016-12-08 11:23:30 -05:00
Jérémie Astori 17170992c3 Ensure Python 2.4 compatibility and Linux-restricted support
- Make build_entry compatible with Python 2.4
- Re-add missing warning/comment that was forgotten while refactoring
- Replace `all()` with a good ol' for-loop Python 2.4 compatibility
- Make a condition check more explicit (when `state` is `query`)
- Make sure this module can only be run with on a Linux distribution
- Add a note about Linux-only support in the documentation
- Set the version in which recursive support was added, 2.0
2016-12-08 11:23:30 -05:00
Marius Gedminas 9ab2e9c740 Fix obvious copy-paste error in module docs 2016-12-08 11:23:30 -05:00
Toshio Kuratomi a10b0e6fff Modify the default for synchronize's dest_port again 2016-12-08 11:23:30 -05:00
Toshio Kuratomi 052320b452 Update docs to reflect precedence for synchronize's dest_port param 2016-12-08 11:23:29 -05:00
Toshio Kuratomi 9ba5a438a8 Allow mode as a synchronize parameter (handled in action plugin) 2016-12-08 11:23:29 -05:00
Markus Juenemann 47065c2a43 Removed check whether destination directory is writable from files/unarchive.py. This check will prevent extraction of an archive if the archive does not actually write to the destination directory but only writes to any writable sub-directories of it. The underlying tar command will report errors should it try to write to read-only directories. 2016-12-08 11:23:29 -05:00
Jérémie Astori edf531efd7 Add recursive support for ACL module (fix #5053, fix #5550, fix #7276) 2016-12-08 11:23:28 -05:00
Toshio Kuratomi a01a800b65 Fi the local_rsync_path parameter used by the action plugin 2016-12-08 11:23:26 -05:00
James Cammarata ba9ba7d0f5 In copy, set the mode before running th validation
Because some programs that do validation (like visudo) may require
the permissions to be more restricted.

Fixes ansible/ansible#11385
2016-12-08 11:23:26 -05:00
Brian Coca 56354731ce fixed fragment docs 2016-12-08 11:23:26 -05:00
Mike Putnam 9623cd570c Add missing GPLv3 License header
Fixes #1643
2016-12-08 11:23:25 -05:00
Jeff Widman 70b3290a3b Move validate command into doc fragment and fix a few typos 2016-12-08 11:23:24 -05:00
Isaac Simmons 07ccd3c86b Handle ini file properties that contain interpolation errors in the initial values 2016-12-08 11:23:23 -05:00
Patrik Lundin 88881415e9 synchronize: add flag for verifying target host.
Add the possibility to verify the target host using a "verify_host"
flag. It is disabled by default to not change the module behaviour.
2016-12-08 11:23:22 -05:00
Brian Coca e4dd0d98d4 now captures any exceptions when trying to create directories 2016-12-08 11:23:21 -05:00
Brian Coca 60d160a2e9 Also document in example that unarchive download was added in 2.0 2016-12-08 11:23:20 -05:00
Mitchell Ludwig b664603a4d Improved stat documentation 2016-12-08 11:23:20 -05:00
Brian Coca f8f4a7dcdf added ignore hidden to assemble 2016-12-08 11:23:18 -05:00