summaryrefslogtreecommitdiff
path: root/files
Commit message (Collapse)AuthorAgeFilesLines
* Refreshed metadata for extras modulesToshio Kuratomi2016-12-064-0/+16
|
* Make `main()` calls conditional - files (#3658)Fabio Alessandro Locati2016-12-051-1/+3
|
* Correct indentation in examples - files/blockinfile.py (#3630)Fabio Alessandro Locati2016-12-041-3/+3
| | | | * indentation in with_items section is out, correct that.
* Native YAML - files (#3608)Fabio Alessandro Locati2016-12-012-7/+17
|
* blockinfile: Fixes #1926 by comparing a marker to a whole line instead of a ↵Koki Nomura2016-11-171-2/+2
| | | | line prefix (#3339)
* tempfile: simple module creating temporary files/directories in ↵Krzysztof Magosa2016-11-101-0/+106
| | | | OS-independent manner (#2991)
* Archive is being added in 2.3 rather than 2.2Toshio Kuratomi2016-11-021-1/+1
|
* Make blockinfile work with python3Michael Scherer2016-10-241-10/+11
| | | | | | | | | | | Traceback (most recent call last): File \"/tmp/ansible_ueg52c0b/ansible_module_blockinfile.py\", line 319, in <module> main() File \"/tmp/ansible_ueg52c0b/ansible_module_blockinfile.py\", line 259, in main if line.startswith(marker0): TypeError: startswith first arg must be bytes or a tuple of bytes, not str Also clean imports while on it.
* blockinfile: Add a newline at EOF when the file is newly created (#3174)YAEGASHI Takeshi2016-10-241-1/+1
| | | Ref: #2687
* Do not import splitter, since we do not use itMichael Scherer2016-10-191-1/+0
|
* Fix `archive` truncating archived file names based on prefix length (#3124)Ryan Brown2016-10-141-4/+5
| | | | | | | | | | When archiving multiple files, the full length of the calculated `arcroot` would be removed from the beginning of all file names. If there was no arcroot, the first two characters of all files would be removed, so `file.txt` would become `le.txt`. This patch uses the regular expressions substitution anchored to the start of the string, so the arcroot is only removed if it is actually present.
* Updates to `archive` module based on code review (#2699)Benjamin Doherty2016-09-131-77/+93
| | | | | | | | * Use common file arguments on destination file * Rename 'compression' to 'format' h/t @abadger * Add support for plain 'tar' format * Ensure check_mode is respected
* Use addresses and names reserved for documentation (#2894)Robin Schneider2016-09-121-1/+1
| | | | | Trying to preserve the meaning of the examples. Related to: https://github.com/ansible/ansible/issues/17479
* added unsafe_writes to blockinfile (#2701)Brian Coca2016-08-091-1/+1
| | | depends on http://github.com/ansible/ansible/issues/17016
* Merge pull request #2323 from bendoh/bendoh-archive-moduleJohn R Barker2016-08-031-0/+385
|\ | | | | New Module: archive
| * expanduser() on destBen Doherty2016-06-011-1/+3
| |
| * Refactor computation of archive filenames, clearer archive filenameBen Doherty2016-06-011-12/+11
| |
| * Don't try to walk over files when building archiveBen Doherty2016-06-011-25/+34
| |
| * Rename 'archive' -> 'arcfile' in compress branchBen Doherty2016-06-011-6/+6
| |
| * Change 'creates' parameter to 'dest'Ben Doherty2016-06-011-34/+34
| |
| * Refactor zip and tarfile loops together, branch where calls are differentBen Doherty2016-05-311-40/+36
| | | | | | | | This fixed a few bugs and simplified the code
| * Merge branch 'bendoh-archive-module' of ↵Ben Doherty2016-05-311-0/+1
| |\ | | | | | | | | | | | | | | | | | | github.com:bendoh/ansible-modules-extras into bendoh-archive-module * 'bendoh-archive-module' of github.com:bendoh/ansible-modules-extras: Add 'default' to docs for 'compression' option
| | * Add 'default' to docs for 'compression' optionBenjamin Doherty2016-05-281-0/+1
| | |
| * | Some refactoring:Ben Doherty2016-05-311-11/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | * rename archive -> arcfile (where it's a file descriptor) * additional return * simplify logic around 'archive?' flag * maintain os separator after arcroot * use function instead of lambda for filter, ensure file exists before file.cmp'ing it * track errored files and fail if there are any
| * | Reword comments slightlyBen Doherty2016-05-311-2/+2
| |/
| * Documentation updatesBen Doherty2016-05-271-5/+4
| |
| * Use different syntax in lambdaBen Doherty2016-05-271-5/+1
| |
| * Make remove default to false. It's less frightening.Ben Doherty2016-05-261-8/+14
| |
| * Don't use <x> if <y> else <z> syntaxBen Doherty2016-05-261-1/+5
| |
| * Accept 'path' as a list argument, expose path and expanded_path,Ben Doherty2016-05-261-9/+5
| | | | | | | | Use correct variable in expanduser
| * Fix up for zip files and nesting logic.Ben Doherty2016-05-261-9/+40
| | | | | | | | | | | | | | * Don't include the archive in the archive if it falls within an archived path * If remove=True and the archive would be in an archived path, fail. * Fix single-file zip file compression * Add more documentation about 'state' return
| * Add licenseBen Doherty2016-05-261-0/+20
| |
| * Add compressed file source to successes when succeeds!Ben Doherty2016-05-261-0/+2
| |
| * Add RETURN documentationBen Doherty2016-05-261-0/+21
| |
| * Fix write mode for ZipFiles ('wb' is invalid!)Ben Doherty2016-05-261-1/+1
| |
| * Drop extra double-quote from documentationBen Doherty2016-05-261-1/+1
| |
| * Initial commit of extras/archive module.Ben Doherty2016-05-261-0/+285
| | | | | | | | | | | | | | | | | | | | This manages compressed files or archives of many compressed files. You can maintain or update .gz, .bz2 compressed files, .zip archives, or tarballs compressed with gzip or bzip2. Possible use cases: * Back up user home directories * Ensure large text files are always compressed * Archive trees for distribution
* | Fix check mode for blockinfile when 'create: yes' is specified (#2413)Anton Ovchinnikov2016-07-281-2/+9
| | | | | | | | Make the module more semantically similar to lineinfile when the destination does not exist. This fixes #2021.
* | Fixed /etc/hosts example for blockinfile (#2387)tazle2016-06-081-2/+2
| | | | | | | | - Fixed name - Fixed name/ip order in template
* | Don't bomb if original didn't exist (#2295)dougluce2016-05-251-1/+1
|/ | | | If we don't have an existing file, original ends up as None. Bug introduced in 70fa125
* Port patch.py to python3/python2.4 syntax (#2276)Michael Scherer2016-05-231-1/+2
|
* blockinfile will always add newline at EOF (#2261)Hans-Joachim Kliemeck2016-05-201-1/+3
|
* the ansible version constant is now in a different placeToshio Kuratomi2016-05-121-1/+1
|
* Use path type for blockinfile 'dest' argument (#2192)Michael Scherer2016-05-101-2/+2
|
* Switch blockinfile to using the latest best way to get ansible versionToshio Kuratomi2016-04-291-3/+1
|
* Switch from deprecated ANSIBLE_VERSION to ansible.__version__Toshio Kuratomi2016-04-241-5/+7
|
* Merge pull request #1873 from mscherer/fix_1849Brian Coca2016-03-191-4/+4
|\ | | | | Reindent with_items, fix #1849
| * Reindent with_items, fix #1849Michael Scherer2016-03-191-4/+4
| |
* | Doc fixesToshio Kuratomi2016-03-181-1/+1
|/
* added docs to blockinfile with_ interactionsBrian Coca2016-02-241-0/+12
| | | | fixes #1592