Initial cleanup of file module

* Remove use of six.b as Python-2.6+ have byte literals.
* Make AnsibleModule a global object so we'll have access to it in all
  the functions we're going to break this up into.
* Rework the parameters so things that are in file_common_args are used
  from file_common_args or the reason for deviation is documented.
* Remove validate as a parameter: this should be taken care of by
  removing it from params before the copy and template action plugin
  invoke file.
* Rename diff_peek to _diff_peek as it is an internal parameter.
* add module_name execute_module call to assemble so that it is more greppable
This commit is contained in:
Toshio Kuratomi 2018-04-23 19:38:42 -07:00
parent d994595660
commit 6b6c4914d2
4 changed files with 21 additions and 17 deletions

View file

@ -103,7 +103,7 @@ class ActionModule(ActionBase):
raise AnsibleActionFail("src and dest are required")
if boolean(remote_src, strict=False):
result.update(self._execute_module(task_vars=task_vars))
result.update(self._execute_module(module_name='assemble', task_vars=task_vars))
raise _AnsibleActionDone()
else:
try: