Commit Graph

65 Commits (648fd28dce8063770b0faef5cbb036a91f3a1c89)

Author SHA1 Message Date
Brian Coca a17091ba96 Added 'validate' feature to copy and template modules, now you can add a check to force copy to fail if the check fails.
had to add entry in file for it to accept as a option even though file itself ignores it.
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
12 years ago
mavimo e5fe7f1afc Double quoted version_added in documentation 12 years ago
Tim Gerla 47f089ff33 Add some examples for local_action and rsync 12 years ago
Michael DeHaan 03f41c1cec Ensure that when transferring a file to a directory the name of the file is the correct basename and not 'source'. 12 years ago
Daniel Hokka Zakrisson 9b0e0fa15f Restore force in copy since arguments are no longer clobbered
Fixes #2388.
12 years ago
Michael DeHaan fdee719d79 Temporarily disable force logic on copy module 12 years ago
Michael DeHaan 54a2b25c58 Updated copy documentation. 12 years ago
Patrick Pelletier e19878bc21 Add support to directly set content in copy module 12 years ago
Daniel Hokka Zakrisson 1dadd70d9f Remove choices=BOOLEANS as it is no longer needed 12 years ago
Daniel Hokka Zakrisson 0150f18a3b Use argument type checking to convert to boolean 12 years ago
Dag Wieers fbce4c28ba Add force= and make thirsty= an alias for backward compatibility 12 years ago
Michael DeHaan 711bc4db05 resolve merge conflict 12 years ago
Michael DeHaan f64b44ad9c Slight docs tweak about thirsty mode on the copy module 12 years ago
Brian Coca 104d32038f added thirsty option to copy
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
12 years ago
Michael DeHaan 1bbe06f92e This implements a basic --check mode which for now is only implemented on template & copy operations. More detail will be shared with the list
shortly.
12 years ago
Michael DeHaan 6f6559670f chmod -x for all module files in source checkout 12 years ago
Daniel Hokka Zakrisson 447ea1624a When atomically replacing files, copy attributes 12 years ago
Jan-Piet Mens d069c57974 Reformat code: examples consistently
- added terse syntax to modules.rst
 - added description of special variables to template module
12 years ago
Michael DeHaan eaaa9e447b Various performance streamlining and making the file features usable in all modules without daisy chaining. 12 years ago
Luke Antins a67f841b16 Copy module can replace symlink with a real file. 12 years ago
Michael DeHaan 37dedf719d implement lookup plugins for arbitrary enumeration over arbitrary things. See the mailing list for some cool examples. 12 years ago
Jan-Piet Mens 267ada33eb Module DOCUMENTATION: assemble, authorized_key, command, copy
plus a small fix in rst.j2 template
  manpages generated & checked
  modules.html generated & checked
12 years ago
Stephen Fromm 77c88fa63a Give nice error message if destination directory doesn't exist (issue #1048) 12 years ago
Brian Coca d682807c7b time is what i wanted, not gmtime
Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>
12 years ago
Brian Coca 7b44dd530f small fix to prevent temp file from living past its succesful usage
Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>
12 years ago
Brian Coca 0235be4db5 made copy atomic by creating tmp file in dest location (ensures same partition)
uses pid and epoch to prevent collisions, good enough for most cases
Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>
12 years ago
Michael DeHaan 4223442992 backuplocal => backup_local for API standardization reasons 12 years ago
Daniel Hokka Zakrisson 14eaf79773 Move backup to module_common 12 years ago
Seth Vidal 3cedbb49d5 fix case where destination does not yet exist - no backup can be made 12 years ago
Seth Vidal 05180da537 add backup= option to copy. makes a backup of the file on the target
in a file named: $filename.YYYY-MM-DD@HH:MM~

backup=False is default
12 years ago
Michael DeHaan 5ed21bf443 whitespace + remove deprecated YAML parser (migration script lives in examples/scripts and warning was added
in 0.6 release)
12 years ago
Michael DeHaan baacde6c74 Add encoding lines to python modules such that they can take unicode options if they are fed them, since the
AnsibleModule stuff no longer base64 encodes for simplicity and speed reasons.
12 years ago
Will Thames 8350029e25 Revert acceptance of directory as dest for copy
Although library/copy can be corrected to understand that dest is
a directory, I can't see how to let _execute_copy know this and let the
file module know.

As a better solution than before #733, the copy module now explicitly (rather
than silently) fails when dest is a directory.
12 years ago
Michael DeHaan fb8200b9b9 reinstate invalid argument checks where possible, daisy chainee/chained modules turn it off 12 years ago
u348095 f3d7bee8e1 Allow copy dest argument to be a directory
Could have used shutil.copy rather than shutil.copyfile, but this
implementation preserves the md5 comparison to avoid unnecessary copies
12 years ago
Michael DeHaan 30d10bb485 imports not needed 12 years ago
Michael DeHaan 7b54388393 Port the copy module over to the new "common module" logic. 12 years ago
John Kleint b11f23750f Use iterative MD5 hashing. 13 years ago
Dave Hatton 7293cce498 switch to hashlib.md5 or md5 instead of OS md5 commands 13 years ago
Dave Hatton c588b03810 copy always returned change=true 13 years ago
Dave Hatton 2454c6c12d switch to shutil.copy rather than os.system(cp) 13 years ago
Dave Hatton 8b15c93355 md5 allow copy if file is missing 13 years ago
Jeremy Smitherman 77944949fe Added IndexError catch for copy module, IndexError is thrown if a destination file doesn't exist 13 years ago
Dave Hatton b725b972ad improve error trapping for md5 13 years ago
Ingo Gottwald be894fbb9b Copy module: Extended error handling and fixed error messages 13 years ago
Ingo Gottwald c2d20c8a3f Added to copy module: Error handling for missing permissions on the copy destination 13 years ago
Michael DeHaan 46fddc3557 Merge pull request #495 from nafeger/devel
make copy module implemented closer to other newer modules when returning results
13 years ago
Nathan A. Feger 3b637be97c attempt to make copy more idiomatic. 13 years ago
Fred Alger 9cbdb6ca0a Make shell outs to md5sum work on FreeBSD and OS X
Tested with OS X local connection and Linux remote. The paths to the
md5sum and md5 commands are hardcoded to the most common location. This
will definitely fail if the commands are elsewhere, or if the md5
command doesn't support the -q 'quiet' option.
13 years ago
Stephen Fromm 67ee30f135 Apply logging of arguments to modules (issue #122)
The ohai and facter modules use /usr/bin/logger to log the fact that
they have been invoked.  I added 'import os' to the ping module
so that it could have the same syslog statements as the other modules.
I separated the condensed:
    shlex.split(open(argfile, 'r').read())
into two separate statements similar to the other modules.
13 years ago