Adding new tests for assemble role

This commit is contained in:
James Cammarata 2014-02-24 11:21:41 -06:00
parent 106a0fc8fd
commit 33d9a662ee

View file

@ -107,7 +107,7 @@ def assemble_from_fragments(src_path, delimiter=None, compiled_regexp=None):
continue continue
fragment = "%s/%s" % (src_path, f) fragment = "%s/%s" % (src_path, f)
if delimit_me and delimiter: if delimit_me and delimiter:
tmp.write(delimiter) tmp.write("%s\n" % delimiter)
if os.path.isfile(fragment): if os.path.isfile(fragment):
tmp.write(file(fragment).read()) tmp.write(file(fragment).read())
delimit_me = True delimit_me = True
@ -171,7 +171,7 @@ def main():
file_args = module.load_file_common_arguments(module.params) file_args = module.load_file_common_arguments(module.params)
changed = module.set_file_attributes_if_different(file_args, changed) changed = module.set_file_attributes_if_different(file_args, changed)
# Mission complete # Mission complete
module.exit_json(src=src, dest=dest, md5sum=destmd5, changed=changed, msg="OK") module.exit_json(src=src, dest=dest, md5sum=pathmd5, changed=changed, msg="OK")
# import module snippets # import module snippets
from ansible.module_utils.basic import * from ansible.module_utils.basic import *