Michael DeHaan
2ddb251538
Merge pull request #6597 from tarka/handle-uncreated-symlink-tmpfile
...
Handle missing symlink tempfile
11 years ago
Steve Smith
e157355fd6
Only unlink the symlink tempfile on error if it was created in the
...
previous operation.
11 years ago
Brian Coca
1b38bd8a40
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
6e6ad97239
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
f6a75ebaf1
fixed issue with directory permissions on copy #6552
11 years ago
James Cammarata
5d8c9d3f0f
Merge branch 'file_fixes_clean' of https://github.com/bcoca/ansible into bcoca-file_fixes_clean
11 years ago
Cristian Ciupitu
0749112286
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
2d25577e11
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
f62cc1e351
Fix link in documentation
...
c(dest) -> c(path)
11 years ago
Michael DeHaan
6c43e0e010
Simplify file module parameter description.
11 years ago
jctanner
9ed379b7f8
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
aa1f9f24c3
Merge pull request #5264 from drewlll2ll/file-fix
...
file module: Fixed missing prev_state == 'directory' in file
11 years ago
Maykel Moya
0711447d3a
Missing "is" in file module description
11 years ago
Jens Rantil
1b6019f6e0
module(file): Fail instead of exit on exception
11 years ago
Jens Rantil
f4aa808b8d
module(file): state what went wrong on exception
11 years ago
Mike Grozak
ed7c9a1fbb
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
54a28eb45b
Added prev_state for directory
11 years ago
Jens Rantil
705316e303
`file` module: Don't catch `SystemExit`
...
This fixes issue #5159 .
11 years ago
James Tanner
ad837709bd
Addresses #5023 Fix import comments
11 years ago
James Tanner
6000d636b3
Fixes #5023 Convert all modules to use new snippet import pattern
11 years ago
Michael DeHaan
f7c3975f21
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
33242cacf3
Merge pull request #4375 from pfalcon/ansible
...
copy: Implement recursive copying if src is a directory.
11 years ago
James Tanner
5a3032a950
Fixes #4884 Do not prematurely exit from file module if src not defined
11 years ago
James Tanner
934ec1c0b6
Addresses #4801 Update file module docs to indicate behavior for relative src paths
11 years ago
sspans
904a129ac1
skip absolute path creation for old_src, not needed with the new relative links
11 years ago
sspans
684921c1c1
only require absolute paths for hardlinks
11 years ago
James Tanner
f4b59fe285
Fixes #4516 file module: check prev_state earlier and use that if state is not specified
11 years ago
Michael DeHaan
99d6726114
Revert "fix conversion from file to hardlink when force=yes"
...
This reverts commit 4d4518ed52
.
11 years ago
Dave Simons
4d4518ed52
fix conversion from file to hardlink when force=yes
...
Signed-off-by: Dave Simons <dave@inuits.eu>
11 years ago
jctanner
c737f222d5
Merge pull request #4480 from joemaller/absent_path_fix
...
ignore src when file module state=absent
11 years ago
Paul Sokolovsky
2e668f14f7
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
8597bf6bba
ignore src when file module state=absent
11 years ago
Julian Yap
76cec9d360
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
6342046da6
Fixed broken force=yes on files for directories
11 years ago
Michael DeHaan
b9c337e436
"touch" option on file is new in 1.4
11 years ago
James Cammarata
4a467f71cd
Change touched -> touch for new file state, and cleaning up docs
11 years ago
René Moser
3a0fd84115
file: added file attributes in state=touched
11 years ago
René Moser
573ea5bdce
file: skip in check_mode if state=touched
11 years ago
René Moser
06fae59e8b
file: implemented state=touched. Closes GH-4097
11 years ago
Brian Coca
49d7f22db8
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
3e32654f9d
fixing problem causing docs not to build
11 years ago
Ben Podoll
13bef3579f
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
19d78d6e18
Remove reference to 'context' since it's not implemented.
11 years ago
Michael DeHaan
e003f1e1cc
Revert "Fix inconsistent json output"
...
Breaks recursion parameter on file.
This reverts commit e7226e104e
.
11 years ago
Dag Wieers
e7226e104e
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).
12 years ago
Jan-Piet Mens
f77c0a44f9
broken docs in files/file module!
...
remove obsolete examples: key
12 years ago
Michael DeHaan
c9b6f0d0f2
Merge branch 'files_force' of git://github.com/rhaido/ansible into devel
12 years ago
Michael DeHaan
899ea4de82
Styling: indentation
12 years ago
Mike Grozak
bba19cb998
Fixed typo
12 years ago
Mike Grozak
541b086883
Updated documentaion for the file module
12 years ago