Commit Graph

45 Commits (3bee49a3bbf4560d3431bf073cc7b6080f8de6d1)

Author SHA1 Message Date
Dag Wieers 30227ace98
Fix parameter types and other fixes (#50111)
* Fix parameter types and other fixes

* Fix issues after review

* Fix Windows-references in system/files modules

This PR includes:
- Replacing version/v with just Ansible X.Y
- Removing Windows-alternatives from notes

* Update lib/ansible/modules/system/parted.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/system/service.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/system/service.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Revert type change, move to separate PR

* Update lib/ansible/modules/files/replace.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/files/replace.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/files/replace.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/files/replace.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/files/replace.py

Co-Authored-By: dagwieers <dag@wieers.com>

* Update lib/ansible/modules/files/replace.py

Co-Authored-By: dagwieers <dag@wieers.com>
2019-01-18 03:24:47 +01:00
codylane d3fe6c01f2 Addresses comments in #38971 (#44324)
* Controlled params within no section

* Added tests to control params within no section

* Cleaning output_file before creating no-section params and check the content

* addresses comment in PR "s/hate/beverage/g"
2018-10-29 11:33:14 +00:00
Joren Vrancken b954917761 Surround top-level function and class definitions with two blank lines. 2018-07-31 12:06:56 -07:00
Arie Bregman 1c3a117f83 doc: add name to tasks in ini_file module examples (#38888)
One of Ansible best practices is "Always Name Tasks".

This should include tasks in examples as well so people can learn
what is the right way to use it.
2018-05-30 02:02:48 +02:00
Guillaume Coré daeec920b0 ini_file: add allow_no_value param (#24442) 2018-03-05 17:05:41 +01:00
Giovanni Sciortino 602f059875 Add atomic_move in ini_file module
Fixes #34181
2018-02-26 10:53:40 -08:00
Dag Wieers 04b5c17578 ini_file: PEP8 compliancy, pylint and docs (#30851)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
2017-09-25 11:39:46 -04:00
Toshio Kuratomi f203ca7907 Update metadata to 1.1 2017-08-15 23:12:08 -07:00
T. Miller 93e1caccb7 ini_file: Match tabs before options (#28102) 2017-08-12 09:17:25 +02:00
Abhijeet Kasurde bf54a0c3e5 Fix missing import and boilerplate
Added fix for missing imports and boilerplate in files modules,
also, removed get_exception calls to match 2.6> exception handling.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-08-03 08:39:15 -07:00
Matt Parkes f0f20d8a1c ini_file 'create' parameter default value should be True
Updated create default value to True to match documentation (and common sense).
2017-04-13 11:08:21 -04:00
Toshio Kuratomi eb1214baad New metadata 1.0 (#22587)
Changes to the metadata format were approved here:
https://github.com/ansible/proposals/issues/54
* Update documentation to the new metadata format
* Changes to metadata-tool to account for new metadata
  * Add GPL license header
  * Add upgrade subcommand to upgrade metadata version
  * Change default metadata to the new format
  * Fix exclusion of non-modules from the metadata report
* Fix ansible-doc for new module metadata
* Exclude metadata version from ansible-doc output
* Fix website docs generation for the new metadata
* Update metadata schema in valiate-modules test
* Update the metadata in all modules to the new version
2017-03-14 09:07:22 -07:00
Benjamin Jolivot 22d657d3c7 Fix #22130 (ini_file crash when destination file don't exists or is e… (#22132)
* Fix #22130 (ini_file crash when destination file don't exists or is empty)
2017-03-01 08:20:51 -08:00
Tim Rupp f8cbfad5e6 Removes usage of expanduser due to type 'path'
Removes the usage of the expanduser function because it is
being performed automatically by the type 'path' of the
path option.
2017-02-13 17:24:24 -05:00
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