From 4dd8311e8876a9f90357a35f21c9d5882975c075 Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Sat, 13 Aug 2022 17:01:49 +0100 Subject: [PATCH] marked support check as false --- ansible/library/portainer.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/ansible/library/portainer.py b/ansible/library/portainer.py index c4c8c1f..bb2e90c 100755 --- a/ansible/library/portainer.py +++ b/ansible/library/portainer.py @@ -1,7 +1,5 @@ #!/usr/bin/python -# Copyright: (c) 2018, Terry Jones -# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type @@ -106,6 +104,7 @@ def _query_params_to_string(params): s += f"&{k}={v}" return s + class PortainerClient: def __init__(self, creds): self.base_url = creds["base_url"] @@ -251,18 +250,12 @@ def run_module(): # supports check mode module = AnsibleModule( argument_spec=module_args, - supports_check_mode=True + supports_check_mode=False ) client = PortainerClient(creds=_extract_creds(module)) state_fns[module.params["state"]](client, module) - # # if the user is working with this module in only check mode we do not - # # want to make any changes to the environment, just return the current - # # state with no modifications - # if module.check_mode: - # module.exit_json(**result) - def main(): run_module()