Commit Graph

32 Commits (cac11f9b801eb73ec3991f0f60eac4366d17a49f)

Author SHA1 Message Date
Brian Coca c119d54e4a
now get_url defaults to module temp dir (#36218)
* now get_url and other modules default to module temp dir

also fixed 'bare' exception

* allow modules to work with older versions

* updated docs per feedback
2018-02-20 08:40:45 -05:00
Strahinja Kustudic 769881198f Sets sane defaults for follow in file modules (#31430)
* Sets sane defaults for follow in file modules
* Add a note in replace for removal of `follow` option
2017-11-03 17:13:58 -07:00
Dag Wieers 5175bd8ebd replace: PEP8 compliancy, pylint and docs (#30856)
This PR includes;
- PEP8 compliancy fixes
- pylint fixes
- Documentation updates
2017-09-25 17:55:45 -04:00
Toshio Kuratomi f203ca7907 Update metadata to 1.1 2017-08-15 23:12:08 -07:00
Evan Kaufman 767be93f77 Replace - Clarified regex docs (#26727)
* Clarified docs regarding multiline mode and negated character sets

Refs #26712

* Escaped newline
2017-08-14 14:25:08 -07: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
Evan Kaufman 3d1701b959 Fixed subsection replacement with before/after patterns
* using a _named_ capture in our assembled pattern, since before/after could potentially contain their own parenthesized captures
* ensuring we only replace against the named capture in question
* removing some duplication in the regexp replacement, that was introduced in ansible/ansible#22535
* fixed edge case of before/after not matching file content to replace

Fixes ansible/ansible#24840
2017-06-07 01:45:34 -07:00
Toshio Kuratomi 6e473a432b Document the encoding parameter for the replace module
Add encoding parameter for replace to changelog
2017-06-05 19:39:56 -07:00
Evan Kaufman 49fe53266f Replace - workaround for non-utf8 text (#24861)
* Workaround for non-utf8 text exceptions
* Added encoding param, using to convert from bytes to text and back

Fixes ansible/ansible#24521
2017-06-05 19:35:18 -07:00
Brian Coca 455aff8436 ported fix from ansible-core #5639
From 3d09c94faeaa52075055f23744d8b52581c59bb2 Mon Sep 17 00:00:00 2001
Evan Kaufman <evan@digitalflophouse.com>
2017-03-21 16:03:00 -04:00
Brian Coca c6dedea1a6 corrected docs 2017-03-16 17:36:03 -04:00
Jens Carl cd39ff9996 Add parameters to limit replace to certain section of the file
Add parameters 'after' and 'before' to limit the replacement/remove of
lines to a certain section of the file.
2017-03-16 17:34:56 -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
Tim Rupp 888c8614fb Removes expanduser calls
The usage of type='path' includes the expanduser call itself. This
patch removes its duplicate usage. Related to #12263
2017-02-27 09:22:48 -05:00
Matt Martz 829c0b8f62 Update validate-modules (#20932)
* Update validate-modules

* Validates ANSIBLE_METADATA
* Ensures imports happen after documentation vars
* Some pep8 cleanup

* Clean up some left over unneeded code

* Update modules for new module guidelines and validate-modules checks

* Update imports for ec2_vpc_route_table and ec2_vpc_nat_gateway
2017-02-02 11:45:22 -08:00
Matt Clay 1c6bb4add9 Remove duplicate import. 2017-01-28 12:45:45 -08: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
Evan Kaufman aaf13e07fe Handle byte/string conversion on read/write with text module_utils (#19188)
Fixes ansible/ansible-modules-core#5840, moved from ansible/ansible-modules-core#5847
2016-12-11 09:00:01 +01: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 d3e7d4f469 Change example syntax on replace module 2016-12-08 11:25:29 -05:00
Evan Kaufman 42079bcc59 Exposed backup file path, simplified result args (#5364)
Fixes #245
2016-12-08 11:25:24 -05:00
Evan Kaufman 77f5472a53 Declare empty diff dict ahead of time (#4646)
Fixes #4634
2016-12-08 11:24:59 -05:00
Evan Kaufman 254df9bcca Implemented file content diff for replace module (#4479) 2016-12-08 11:24:54 -05:00
Brian Coca 81e87cefd7 unsafe writes! (#4314)
* unsafe writes!

* moved unsafe_write docs and args to file common

* added unsafe_writes option handling
2016-12-08 11:24:49 -05:00
Brian Coca b357f4dd72 added follow to specific modules that support it
was removed from common file docs
2016-12-08 11:24:06 -05:00
Jeff Widman 70b3290a3b Move validate command into doc fragment and fix a few typos 2016-12-08 11:23:24 -05:00
Greg DeKoenigsberg eb881d7d5d Proper author info for all remaining modules 2016-12-08 11:23:07 -05:00
Toshio Kuratomi 7e5a4afb6b Update module "imports" to new style
Fixes #1351
2016-12-08 11:23:00 -05:00
sysadmin75 2990358cd5 Fix #10059 - replace module does not obey follow=yes 2016-12-08 11:22:39 -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