James Cammarata
d60ac967b9
Merge branch 'file_fixes_clean' of https://github.com/bcoca/ansible into bcoca-file_fixes_clean
2014-03-17 14:03:26 -05:00
Cristian Ciupitu
7f681c33a2
Micro-optimization: replace s.find(x)!=-1 with x in s
...
timeit shows a speedup of ~3x on Python 2.7.5 x86_64.
It also makes the code a bit shorter.
2014-03-16 13:10:28 -04:00
Brian Coca
7ca6343ca3
Fixes and cleanup to file functions and module
...
- unified set attribute functions ... not sure why 2 identical functions
exist with diff names, now there are 3 while i repoint all modules to 1
- fixed issue with symlinks being created w/o existing src when force=no
- refactored conditionals, simplified where possible
- added tests for symlink to nonexistant source, with both force options
- made symlink on existing attomic (force)
2014-03-15 13:54:24 -04:00
Sven Schliesing
b55f99b803
Fix link in documentation
...
c(dest) -> c(path)
2014-03-06 13:16:29 +01:00
Michael DeHaan
2f12c6ddf6
Simplify file module parameter description.
2014-02-28 13:55:07 -05:00
jctanner
95131937df
Merge pull request #5282 from rhaido/hard_link_fix
...
file module: Added to the file module the functionality to force conversion hard link...
2014-01-14 07:15:46 -08:00
jctanner
87b58666f9
Merge pull request #5264 from drewlll2ll/file-fix
...
file module: Fixed missing prev_state == 'directory' in file
2014-01-06 14:07:07 -08:00
Maykel Moya
8f766bdcdd
Missing "is" in file module description
2013-12-26 12:34:46 +01:00
Jens Rantil
38d0df65d8
module(file): Fail instead of exit on exception
2013-12-13 21:34:19 +01:00
Jens Rantil
4262e76aec
module(file): state what went wrong on exception
2013-12-13 21:33:19 +01:00
Mike Grozak
5a66a95bf3
Added to the file module the functionality to force conversion hard link and symlink when the force attribute is set to 'yes'
2013-12-13 17:10:50 +01:00
drewlll2ll
8fe3b05262
Added prev_state for directory
2013-12-12 09:44:29 -05:00
Jens Rantil
b8347a3144
file
module: Don't catch SystemExit
...
This fixes issue #5159 .
2013-12-04 13:13:49 +01:00
James Tanner
4f9aadcc07
Addresses #5023 Fix import comments
2013-12-02 15:13:49 -05:00
James Tanner
38edad70ac
Fixes #5023 Convert all modules to use new snippet import pattern
2013-12-02 15:11:23 -05:00
Michael DeHaan
08996d78d6
Add version_added to all modules missing version_added information, the docs formatter will now
...
raise errors when omitted, updated changelog with new modules.
2013-11-18 18:55:49 -05:00
James Tanner
0f3093516d
Merge pull request #4375 from pfalcon/ansible
...
copy: Implement recursive copying if src is a directory.
2013-11-13 15:52:40 -05:00
James Tanner
53ba890312
Fixes #4884 Do not prematurely exit from file module if src not defined
2013-11-12 18:17:20 -05:00
James Tanner
2c57b999fc
Addresses #4801 Update file module docs to indicate behavior for relative src paths
2013-11-07 17:02:34 -05:00
sspans
9f322a5178
skip absolute path creation for old_src, not needed with the new relative links
2013-11-04 10:44:06 +01:00
sspans
4957115e51
only require absolute paths for hardlinks
2013-11-04 10:37:36 +01:00
James Tanner
c3159fefab
Fixes #4516 file module: check prev_state earlier and use that if state is not specified
2013-11-01 09:31:32 -04:00
Michael DeHaan
772bd33a0f
Revert "fix conversion from file to hardlink when force=yes"
...
This reverts commit 4d4518ed52
.
2013-10-27 11:51:43 -04:00
Dave Simons
1f86abcba6
fix conversion from file to hardlink when force=yes
...
Signed-off-by: Dave Simons <dave@inuits.eu>
2013-10-22 10:46:45 +02:00
jctanner
9543169cca
Merge pull request #4480 from joemaller/absent_path_fix
...
ignore src when file module state=absent
2013-10-16 17:29:21 -07:00
Paul Sokolovsky
2b081b517e
copy: Handle "no copy/propagate attrs only" for recursive mode well.
...
For this, add internal "original_basename" param to file module,
similar to copy module. (Param name is a bit misnormer now, should
be treated as "original basepath").
2013-10-15 18:40:40 +03:00
Joe Maller
f7e30347f6
ignore src when file module state=absent
2013-10-13 01:22:53 -04:00
Julian Yap
48d2747b6a
Assume state='directory' if recurse is set and previous state was 'directory'
...
Resolves this issue: https://github.com/ansible/ansible/issues/2067
2013-10-11 15:56:14 -10:00
Andrew Pope
4e56510fab
Fixed broken force=yes on files for directories
2013-10-11 18:02:18 -04:00
Michael DeHaan
41140c94a6
"touch" option on file is new in 1.4
2013-10-04 08:45:05 -04:00
James Cammarata
d83b7b4009
Change touched -> touch for new file state, and cleaning up docs
2013-09-22 09:16:07 -05:00
René Moser
958abc8a9a
file: added file attributes in state=touched
2013-09-22 12:54:24 +02:00
René Moser
4a61481498
file: skip in check_mode if state=touched
2013-09-22 12:53:49 +02:00
René Moser
ddd35b187c
file: implemented state=touched. Closes GH-4097
2013-09-21 15:07:50 +02:00
Brian Coca
0121b96b1a
now correctly detects hard links
...
simplified check_mode
simplified other file attribute handling in link mode
made conditionals clearer
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
2013-08-15 23:39:02 -04:00
Ben Podoll
5c3addac8d
fixing problem causing docs not to build
2013-08-12 12:17:34 -05:00
Ben Podoll
29f41cf273
adding a little more info to the 'path' param so it's clear there are aliases (which are used in other examples) to avoid confusion
2013-08-12 11:45:32 -05:00
Michael DeHaan
3b3ff552f2
Remove reference to 'context' since it's not implemented.
2013-07-21 11:52:22 -04:00
Michael DeHaan
be35a035b3
Revert "Fix inconsistent json output"
...
Breaks recursion parameter on file.
This reverts commit e7226e104e
.
2013-07-20 18:08:42 -04:00
Dag Wieers
f38d7bc7f0
Fix inconsistent json output
...
The file module would in some cases return dest=/path/to/file, and in other cases return path=/path/to/file, this change makes it more consistent and in line with all the other file-related modules (i.e. copy, assemble, template, ...) by using dest= instead of path= as the input and output argument. (Of course, path is still there as an alias for compatibility).
2013-07-12 21:23:34 +02:00
Jan-Piet Mens
e788a5d930
broken docs in files/file module!
...
remove obsolete examples: key
2013-07-01 12:18:07 +02:00
Michael DeHaan
51a7086c95
Merge branch 'files_force' of git://github.com/rhaido/ansible into devel
2013-06-30 19:24:37 -04:00
Michael DeHaan
90c1701f1c
Styling: indentation
2013-06-30 18:51:11 -04:00
Mike Grozak
da2fb08d47
Fixed typo
2013-06-20 12:46:23 +02:00
Mike Grozak
58618eef8d
Updated documentaion for the file module
2013-06-20 12:46:23 +02:00
Mike Grozak
ee813d3bd7
added possibility to force symlinks to none-existent destination (which might appear later)
2013-06-20 12:43:23 +02:00
Mike Grozak
4716b779f6
added force parameter to symlink invocation, in order to force the creation in case of already existing destination with the type of 'file'
2013-06-20 12:43:23 +02:00
Michael DeHaan
393bfd59b7
Merge branch 'file_hard' of git://github.com/bcoca/ansible into devel
...
Conflicts:
library/files/file
2013-06-18 20:31:05 -04:00
Michael DeHaan
152db00ed9
Merge remote branch 'origin' into devel
...
Conflicts:
library/web_infrastructure/django_manage
2013-06-16 22:15:30 -04:00
Jan-Piet Mens
3404a0fc16
DOCS: standardize on EXAMPLES (a.k.a. Docs-JumboPatch JetLag Edition)
...
Migrated all examples: in DOCUMENTATION=''' string to standalone EXAMPLES=''' string
Added deprecation warning to moduledev.rst and remove deprecated example from it
Fixed up a few typos and uppercased some acronyms.
add consistency to how EXAMPLES are formatted
2013-06-15 20:54:25 +02:00