James Tanner
199992adb6
Fixes #6894 create docs fragment for files
11 years ago
Michael DeHaan
63a1330263
Use common file argument system previously implemented by @sivel for rax modules on the file modules as well (copy/file/template).
...
Application to other cloud providers would make very good sense.
11 years ago
James Tanner
7b72004eb4
Merge #5903 from rhaido/ansible
...
Update files documentation for usage of force=True and hardlinks
11 years ago
Michael DeHaan
38c3332b8a
Merge pull request #6597 from tarka/handle-uncreated-symlink-tmpfile
...
Handle missing symlink tempfile
11 years ago
Steve Smith
5b5af14921
Only unlink the symlink tempfile on error if it was created in the
...
previous operation.
11 years ago
Brian Coca
a395eb3aba
fixed issue with tmp file (path can include filename) and added missing
...
else which made it try to link x2
11 years ago
Brian Coca
4fd957620a
now correctly checks absolute path for src= existance for links
...
also updated docs to be a bit clearer on symlink behaviour
11 years ago
Brian Coca
402cd11c52
fixed issue with directory permissions on copy #6552
11 years ago
James Cammarata
d60ac967b9
Merge branch 'file_fixes_clean' of https://github.com/bcoca/ansible into bcoca-file_fixes_clean
11 years ago
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.
11 years ago
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)
11 years ago
Sven Schliesing
b55f99b803
Fix link in documentation
...
c(dest) -> c(path)
11 years ago
Michael DeHaan
2f12c6ddf6
Simplify file module parameter description.
11 years ago
Mike Grozak
3f74dd6592
Updated the force parameter description; added one example how to create the symlinks pointing to non-absolute paths
11 years ago
Mike Grozak
ecd8b5d064
Found a way how to have symlinks towards files without absolute paths in prefixes; fixed incorrect force setting on the hard links, which can not point to non-existing files
11 years ago
Mike Grozak
4f262779cd
Started the development of the 'chdir' functionality for file module - creation symlinks without the base directory prefix
11 years ago
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...
11 years ago
jctanner
87b58666f9
Merge pull request #5264 from drewlll2ll/file-fix
...
file module: Fixed missing prev_state == 'directory' in file
11 years ago
Maykel Moya
8f766bdcdd
Missing "is" in file module description
11 years ago
Jens Rantil
38d0df65d8
module(file): Fail instead of exit on exception
11 years ago
Jens Rantil
4262e76aec
module(file): state what went wrong on exception
11 years ago
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'
11 years ago
drewlll2ll
8fe3b05262
Added prev_state for directory
11 years ago
Jens Rantil
b8347a3144
`file` module: Don't catch `SystemExit`
...
This fixes issue #5159 .
11 years ago
James Tanner
4f9aadcc07
Addresses #5023 Fix import comments
11 years ago
James Tanner
38edad70ac
Fixes #5023 Convert all modules to use new snippet import pattern
11 years ago
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.
11 years ago
James Tanner
0f3093516d
Merge pull request #4375 from pfalcon/ansible
...
copy: Implement recursive copying if src is a directory.
11 years ago
James Tanner
53ba890312
Fixes #4884 Do not prematurely exit from file module if src not defined
11 years ago
James Tanner
2c57b999fc
Addresses #4801 Update file module docs to indicate behavior for relative src paths
11 years ago
sspans
9f322a5178
skip absolute path creation for old_src, not needed with the new relative links
11 years ago
sspans
4957115e51
only require absolute paths for hardlinks
11 years ago
James Tanner
c3159fefab
Fixes #4516 file module: check prev_state earlier and use that if state is not specified
11 years ago
Michael DeHaan
772bd33a0f
Revert "fix conversion from file to hardlink when force=yes"
...
This reverts commit 4d4518ed52
.
11 years ago
Dave Simons
1f86abcba6
fix conversion from file to hardlink when force=yes
...
Signed-off-by: Dave Simons <dave@inuits.eu>
11 years ago
jctanner
9543169cca
Merge pull request #4480 from joemaller/absent_path_fix
...
ignore src when file module state=absent
11 years ago
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").
11 years ago
Joe Maller
f7e30347f6
ignore src when file module state=absent
11 years ago
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
11 years ago
Andrew Pope
4e56510fab
Fixed broken force=yes on files for directories
11 years ago
Michael DeHaan
41140c94a6
"touch" option on file is new in 1.4
11 years ago
James Cammarata
d83b7b4009
Change touched -> touch for new file state, and cleaning up docs
11 years ago
René Moser
958abc8a9a
file: added file attributes in state=touched
11 years ago
René Moser
4a61481498
file: skip in check_mode if state=touched
11 years ago
René Moser
ddd35b187c
file: implemented state=touched. Closes GH-4097
11 years ago
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>
11 years ago
Ben Podoll
5c3addac8d
fixing problem causing docs not to build
11 years ago
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
11 years ago
Michael DeHaan
3b3ff552f2
Remove reference to 'context' since it's not implemented.
11 years ago
Michael DeHaan
be35a035b3
Revert "Fix inconsistent json output"
...
Breaks recursion parameter on file.
This reverts commit e7226e104e
.
11 years ago