mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
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:
@@ -937,7 +937,7 @@ class ActionBase(with_metaclass(ABCMeta, object)):
|
||||
|
||||
diff = {}
|
||||
display.debug("Going to peek to see if file has changed permissions")
|
||||
peek_result = self._execute_module(module_name='file', module_args=dict(path=destination, diff_peek=True), task_vars=task_vars, persist_files=True)
|
||||
peek_result = self._execute_module(module_name='file', module_args=dict(path=destination, _diff_peek=True), task_vars=task_vars, persist_files=True)
|
||||
|
||||
if not peek_result.get('failed', False) or peek_result.get('rc', 0) == 0:
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user