From 41b72c005508dd46c4d817a535f334a935d0cd4d Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Tue, 29 Sep 2020 06:17:45 +0000 Subject: [PATCH] use FQCN when calling a module from action plugin (#967) (#988) * use FQCN when calling a module from action plugin https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_2.10.html#action-plugins-which-execute-modules-should-use-fully-qualified-module-names * doc: add changelog fragment (minor_changes) * move to shippable/posix/group1 to run tests with ansible 2.9 * move back to shippable/posix/group4 to not share testbed with docker engine on rhel7, that never releases the xtables lock and leads 'iptables_state' tests to always fail. (cherry picked from commit ea1fb83b0c2144ff2125ea3b7c240b74986a4ec0) Co-authored-by: quidame --- .../967-use-fqcn-when-calling-a-module-from-action-plugin.yml | 4 ++++ plugins/action/system/iptables_state.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/967-use-fqcn-when-calling-a-module-from-action-plugin.yml diff --git a/changelogs/fragments/967-use-fqcn-when-calling-a-module-from-action-plugin.yml b/changelogs/fragments/967-use-fqcn-when-calling-a-module-from-action-plugin.yml new file mode 100644 index 0000000000..052e412404 --- /dev/null +++ b/changelogs/fragments/967-use-fqcn-when-calling-a-module-from-action-plugin.yml @@ -0,0 +1,4 @@ +--- +minor_changes: + - iptables_state - use FQCN when calling a module from action plugin + (https://github.com/ansible-collections/community.general/pull/967). diff --git a/plugins/action/system/iptables_state.py b/plugins/action/system/iptables_state.py index 07c6a23dfb..1b689dfb0c 100644 --- a/plugins/action/system/iptables_state.py +++ b/plugins/action/system/iptables_state.py @@ -48,7 +48,7 @@ class ActionModule(ActionBase): # At least one iteration is required, even if timeout is 0. for i in range(max(1, timeout)): async_result = self._execute_module( - module_name='async_status', + module_name='ansible.builtin.async_status', module_args=module_args, task_vars=task_vars, wrap_async=False) @@ -177,7 +177,7 @@ class ActionModule(ActionBase): async_status_args['mode'] = 'cleanup' garbage = self._execute_module( - module_name='async_status', + module_name='ansible.builtin.async_status', module_args=async_status_args, task_vars=task_vars, wrap_async=False)