1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
Commit graph

17 commits

Author SHA1 Message Date
Sam Doran
f52a088862
Add option to ignore, warn, or error when a module parameter is converted to a string ()
* Add new module property to Windows modules
* Add brief pause to file tests to ensure the stat times are not equal, which was happening sometimes.
* Raise TypeError on error rather than fail_json()
* Rework error message to be less verbose
* Add porting guide entry
2019-02-22 16:44:32 -05:00
Jordan Borean
ebc9e4caf7
add pause to make test more stable () 2019-02-04 11:42:40 +10:00
Jordan Borean
419727a6da
file - allow touch on files not owned by user ()
* file - allow touch on files not owned by user

* use Sentinal value and preserved existing args

* Do no instantiate the Sentinel object
2019-01-23 10:14:59 +10:00
Stephen SORRIAUX
a78cc15099 Add new parameters to manage mtime and atime for file module, fixes ()
* Add new parameters related to mtime and atime for file module, fixes 
2018-08-23 17:20:54 -07:00
Andreas Calminder
75e9b76c15 accept + and - modifiers for file attributes ()
* accept + and - modifiers for file attributes
* tests for adding/removing file attributes
2018-06-14 06:31:14 -07:00
Toshio Kuratomi
6227c2ac75
More file refactoring ()
* Set src in the state functions rather than the toplevel

A good API should only require passing one version of a piece of data
around so do that for src

* Move the rewriting of path into additional_parameter_handling

When the path is a directory we can rewrite the path to be a file inside
of the directory

* Emit a warning when src is used with a state where it should be ignored
2018-05-16 10:41:11 -07:00
Toshio Kuratomi
17a4553c68 Reorganize and expand the file tests
* Pull the tests for state=link into their own file
* Pull tests for what happens when dest is a directory out
* Expand both of the above sets of tests
2018-05-03 20:20:04 -07:00
Toshio Kuratomi
6b159fdb03 Fix for file module with recursive permission setting and broken symlinks
There was a traceback when setting permissions on a directory tree when
there were broken symlinks inside of the tree and follow=true.  chmod -R
ignores broken symlinks inside of the tree so we've fixed the file
module to do the same.

Fixes 
2018-05-03 17:54:34 -07:00
Toshio Kuratomi
4f664f8ff6
Fix for file module with symlinks to nonexistent target ()
* Fix for file module with symlinks to nonexistent target

When creating a symlink to a nonexistent target, creating the symlink
would work but subsequent runs of the task would fail because it was
trying to operate on the target instead of the symlink.

Fixes 
2018-05-03 17:50:43 -07:00
Toshio Kuratomi
ce796bc34d Clarify the behaviour of file's src parameter with relative paths
Fixes 

Also sdd some more tests to validate file state=link creates a symlink
which points to the file we intended.
2018-04-20 14:12:27 -07:00
Pierre-Louis Bonicoli
32ba02b626 file tests: control & managed host can be distinct 2018-01-11 10:54:16 -08:00
Maxime de Roucy
c2ac9d0831 fix file attributes changed detection
https://docs.python.org/2/library/stdtypes.html#str.split
str.split([sep[, maxsplit]])
If sep is given, consecutive delimiters are not grouped together and are deemed
to delimit empty strings.

>>> "85563      ----------------C-- /var/lib/libvirt/images".split(' ')[0:2]
['85563', '']
>>> "85563      ----------------C-- /var/lib/libvirt/images".split()[0:2]
['85563', '----------------C--']
2017-12-15 09:48:18 -08:00
Toshio Kuratomi
bc66faa328 Add more tests for copy/file/template with harlinks 2017-08-17 18:16:17 -07:00
Andrew Erickson
2b14fdbce3 add test for template, file, and copy with hardlinks 2017-08-17 18:16:17 -07:00
Marius Gedminas
15c7288ab9 Show diff when file: state=link changes the symlink target ()
* Show diff when file: state=link changes the symlink target

* Integration test for symlink target change

* Also check soft link idempotency
2017-03-06 11:29:20 -05:00
Adrien Vergé
0e834fc9e4 Fix cosmetic problems in YAML source
This change corrects problems reported by the `yamllint` linter.

Since key duplication problems were removed in 4d48711, this commit
mainly fixes trailing spaces and extra empty lines at beginning/end of
files.
2016-11-11 14:50:57 -08:00
Matt Clay
75e4645ee7 Migrate Linux CI roles to test targets. () 2016-10-13 09:09:25 -07:00
Renamed from test/integration/roles/test_file/tasks/main.yml (Browse further)