Commit Graph

31 Commits (8cc98b07c574481dd06c770a7f8e8f0455553476)

Author SHA1 Message Date
Matt Clay cb76200c7d PEP 8 E111 & E114 cleanup. (#20838) 2017-01-30 15:01:47 -08:00
Brian Coca ba97a34bb3 minor doc fix 2017-01-17 10:16:32 -05:00
peay 222e1c97be Fixes #19883: Handle INI files without ending newline (#20016) 2017-01-17 10:16:25 -05:00
Dag Wieers 1ad55ec9de Consistent path attribute for file-related modules
Not all file-related modules consistently use "path" as the attribute to specify a single filename, some use "dest", others use "name". Most do have aliases for either "name" or "destfile".

This change makes "path" the default attribute for (single) file-related modules, but also adds "dest" and "name" as aliases, so that people can use a consistent way of attributing paths, but also to ensure backward compatibility with existing playbooks.

NOTE: The reason for changing this, is that it makes Ansible needlessly harder to use if you have to remember that e.g. the xattr module requires the name attribute, the lineinfile module requires a dest attribute, and the stat module requires a path attribute.
2017-01-13 15:49:42 -05:00
Michael Herold a532dd915a Adds description for ini_file "section: null" 2016-12-19 21:10:30 -05:00
James Cammarata 8afa090417 Resolving differences in core modules post-merge 2016-12-08 11:25:36 -05:00
Toshio Kuratomi 7319104552 Refreshed metadata for core modules 2016-12-08 11:25:35 -05:00
Sam Doran 1923666b22 Change examples syntax on ini_file module 2016-12-08 11:25:29 -05:00
Gyorgy Szombathelyi 33ef72b584 Ini_file: fix regression with the create option
The new create option with the default value 'no' changes the
behavior from the previous Ansible releases. Change the default to
'yes' to create missing ini files by default.

Fixes: #5488
2016-12-08 11:25:28 -05:00
Michael Herold e5cc4a45d3 Removes outdated "requirement" and outdated "note" (#5332)
- 7f59773460d79b3dae34c375ba68caea1bfc09a8 no longer uses `ConfigParser`
- 1d4c0abe2902d91b2895452feedcf72bf3dd9e20 removed the `import` statement
2016-12-08 11:25:26 -05:00
Luca Berruti 2bbbf58156 ini_file: return more infos on changes. 2016-12-08 11:25:23 -05:00
Luca Berruti 6d8b140f46 ini_file: diff support. 2016-12-08 11:25:23 -05:00
Luca Berruti 73401182c1 ini_file: add create= option. 2016-12-08 11:25:23 -05:00
Luca Berruti 1a22dde1ac ini_file: fixes #1788, fails --check when file doesn't exist. 2016-12-08 11:25:23 -05:00
Charles Zaffery 4c830400f8 Remove line when 'state: absent' with 'option:' instead of commenting 2016-12-08 11:25:23 -05:00
John R Barker 25b6492d37 Bulk spelling improvement to modules-core (#5225)
* Correct spelling mistakes

* Correct more spelling issues

* merge conflict

* Revert typo in parms
2016-12-08 11:25:20 -05:00
Andrew Gaffney 460b0e1ab6 Match existing INI file entry with leading whitespace (fixes #4997) (#4998) 2016-12-08 11:25:13 -05:00
nichivo c4f43eb965 Insert missing option line before blank lines (#4747) 2016-12-08 11:25:10 -05:00
Brian Coca a42cb96b75 added backup_file to module returns (#4723)
fixes #14502
also cleaned up some unused stuff and fixed imports
2016-12-08 11:25:02 -05:00
Lukas Grossar 4a532fb60c also match on tabs in ini_file (fixes #106) (#4067)
also match on tabs in ini_file
2016-12-08 11:24:41 -05:00
yarick123 87fe4a2f0c ini_file: added option 'noextraspaces' to turn off inserting extra spaces around '=' symbol
* ini_file: added option 'noextraspaces' to turn off inserting extra spaces around '=' symbol

* ini_file: noextraspaces, python 2.4 compatibility

* ini_file: noextraspaces - yes/no => true/false

* ini_file: noextraspaces - added 'version_added' option

* ini_file: noextraspaces => no_extra_spaces
2016-12-08 11:24:18 -05:00
Ales Nosek df4109d946 Fix #2475 ini_file module: bracklets in key break idempotence
Escape the regex special characters in the option name.
2016-12-08 11:23:50 -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
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
Toshio Kuratomi a179d06a91 Simplify logic to handle options set to empty string
Fixes #2125
2016-12-08 11:23:44 -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
Greg DeKoenigsberg eb881d7d5d Proper author info for all remaining modules 2016-12-08 11:23:07 -05:00
blxd 35c414c271 Added check mode support to the ini_file module 2016-12-08 11:22:45 -05:00
James Cammarata 429ab56e14 Adding file doc fragment to those modules in files/ missing it 2016-12-08 11:22:23 -05:00
Michael DeHaan 213e518165 file extensions! 2016-12-08 11:22:22 -05:00