Commit graph

29 commits

Author SHA1 Message Date
Michael DeHaan
7b54388393 Port the copy module over to the new "common module" logic. 2012-07-21 17:07:42 -04:00
John Kleint
b11f23750f Use iterative MD5 hashing. 2012-07-09 13:27:47 -04:00
Dave Hatton
7293cce498 switch to hashlib.md5 or md5 instead of OS md5 commands 2012-07-09 08:52:00 +01:00
Dave Hatton
c588b03810 copy always returned change=true 2012-07-06 13:43:19 +01:00
Dave Hatton
2454c6c12d switch to shutil.copy rather than os.system(cp) 2012-07-04 12:26:25 +01:00
Dave Hatton
8b15c93355 md5 allow copy if file is missing 2012-07-03 20:07:08 +01:00
Jeremy Smitherman
77944949fe Added IndexError catch for copy module, IndexError is thrown if a destination file doesn't exist 2012-07-03 14:12:19 -04:00
Dave Hatton
b725b972ad improve error trapping for md5 2012-07-03 12:44:37 +01:00
Ingo Gottwald
be894fbb9b Copy module: Extended error handling and fixed error messages 2012-06-25 20:45:05 +02:00
Ingo Gottwald
c2d20c8a3f Added to copy module: Error handling for missing permissions on the copy destination 2012-06-23 21:39:37 +02:00
Michael DeHaan
46fddc3557 Merge pull request #495 from nafeger/devel
make copy module implemented closer to other newer modules when returning results
2012-06-20 13:12:24 -07:00
Nathan A. Feger
3b637be97c attempt to make copy more idiomatic. 2012-06-20 14:17:15 -05:00
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.
2012-06-15 00:04:01 -04:00
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.
2012-05-09 15:19:20 -07:00
Seth Vidal
deae763793 very minor indentation issue in librar/copy 2012-04-27 16:45:28 -04:00
Michael DeHaan
d35de23c53 Don't try to expand path for None values 2012-04-20 08:02:12 -04:00
Michael DeHaan
ba882d98e1 Call os.path.expanduser in modules so things work as expected even when using ./hacking/test-module script 2012-04-20 07:57:39 -04:00
Jeroen Hoekx
645640b88d Make copy module idempotent.
Check md5sum before overwriting a file. Unconditionally copying changes the timestamp.
2012-03-31 13:59:41 +02:00
Michael DeHaan
475c38c941 Modules don't have to return JSON, key=value pairs is ok. 2012-03-14 21:16:15 -04:00
Michael DeHaan
81a27b9c88 Fix the copy module to use the argsfile method 2012-03-14 19:09:44 -04:00
Michael DeHaan
c4004ef6d4 Laying the groundwork for async mode, async status script still needs to be done, and async_wrapper
still needs to daemonize.  Then, once done, playbook can be taught how to poll async within the
timing window.
2012-03-03 12:25:56 -05:00
Michael DeHaan
1bd1552b43 Relicensing to GPLv3, all previous committers ok'd on mailing list. 2012-02-28 19:08:09 -05:00
Michael DeHaan
8f9320aa05 Rename 'ensure' to 'state' because I think it's a bit cleaner and doesn't imply
all modules take a common parameter name.  But more or less we still work idempotently
in modules.
2012-02-26 22:31:42 -05:00
Michael DeHaan
07d17e4cb4 Fixed up KV munging in runner, misc fixes to copy, setup, and template modules 2012-02-26 19:55:26 -05:00
Michael DeHaan
5e6bf63215 make copy & template module take key/value parameters so we're consistent. Only the command
module works differently now

starter manpage for modules

allow template file location to be passed into template & setup modules
2012-02-26 19:21:44 -05:00
Michael DeHaan
e202fea4fa trim md5sum string so it does not contain the filename
also fix a bug/typo in the reporting from playbook
2012-02-26 12:10:57 -05:00
Michael DeHaan
fed3462502 applying indentation patch from skvidal 2012-02-25 17:16:23 -05:00
Michael DeHaan
62dee290c5 Implment copy with an actual minion-side module such that we can get md5sum's and
onchange events like Puppet's file providers do.
2012-02-24 05:15:28 -05:00
Michael DeHaan
d27b55baa4 Added file copy support w/ readme updates 2012-02-23 16:07:10 -05:00