diff --git a/plugins/modules/cloud/misc/proxmox_snap.py b/plugins/modules/cloud/misc/proxmox_snap.py index 93fa8d346f..9a9be8dc4d 100644 --- a/plugins/modules/cloud/misc/proxmox_snap.py +++ b/plugins/modules/cloud/misc/proxmox_snap.py @@ -100,7 +100,6 @@ EXAMPLES = r''' RETURN = r'''#''' import time -import traceback from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.common.text.converters import to_native diff --git a/plugins/modules/cloud/opennebula/one_service.py b/plugins/modules/cloud/opennebula/one_service.py index c91708fddd..96f200a39e 100644 --- a/plugins/modules/cloud/opennebula/one_service.py +++ b/plugins/modules/cloud/opennebula/one_service.py @@ -243,7 +243,6 @@ roles: ''' import os -import sys from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.urls import open_url diff --git a/plugins/modules/cloud/ovh/ovh_monthly_billing.py b/plugins/modules/cloud/ovh/ovh_monthly_billing.py index 2d8091c802..445041a23b 100644 --- a/plugins/modules/cloud/ovh/ovh_monthly_billing.py +++ b/plugins/modules/cloud/ovh/ovh_monthly_billing.py @@ -73,8 +73,6 @@ EXAMPLES = ''' RETURN = ''' ''' -import os -import sys import traceback try: diff --git a/plugins/modules/cloud/xenserver/xenserver_guest_powerstate.py b/plugins/modules/cloud/xenserver/xenserver_guest_powerstate.py index d2f0a10329..7903ad8b9f 100644 --- a/plugins/modules/cloud/xenserver/xenserver_guest_powerstate.py +++ b/plugins/modules/cloud/xenserver/xenserver_guest_powerstate.py @@ -171,8 +171,6 @@ instance: } ''' -import re - HAS_XENAPI = False try: import XenAPI diff --git a/plugins/modules/clustering/nomad/nomad_job_info.py b/plugins/modules/clustering/nomad/nomad_job_info.py index 9e293a59d3..5130fd1b60 100644 --- a/plugins/modules/clustering/nomad/nomad_job_info.py +++ b/plugins/modules/clustering/nomad/nomad_job_info.py @@ -266,10 +266,6 @@ result: ''' - -import os -import json - from ansible.module_utils.basic import AnsibleModule, missing_required_lib from ansible.module_utils.common.text.converters import to_native diff --git a/plugins/modules/monitoring/icinga2_host.py b/plugins/modules/monitoring/icinga2_host.py index a846c74f4c..0f4e2b26a0 100644 --- a/plugins/modules/monitoring/icinga2_host.py +++ b/plugins/modules/monitoring/icinga2_host.py @@ -136,7 +136,6 @@ data: ''' import json -import os from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.urls import fetch_url, url_argument_spec diff --git a/plugins/modules/net_tools/dnsimple_info.py b/plugins/modules/net_tools/dnsimple_info.py index b7f5be1a6d..f4a68f509d 100644 --- a/plugins/modules/net_tools/dnsimple_info.py +++ b/plugins/modules/net_tools/dnsimple_info.py @@ -229,7 +229,6 @@ dnsimple_record_info: import traceback from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import missing_required_lib -import json try: from requests import Request, Session diff --git a/plugins/modules/net_tools/ipwcli_dns.py b/plugins/modules/net_tools/ipwcli_dns.py index 8f3b0d1664..9436decc8c 100644 --- a/plugins/modules/net_tools/ipwcli_dns.py +++ b/plugins/modules/net_tools/ipwcli_dns.py @@ -158,7 +158,6 @@ record: ''' from ansible.module_utils.basic import AnsibleModule -import os class ResourceRecord(object): diff --git a/plugins/modules/packaging/language/yarn.py b/plugins/modules/packaging/language/yarn.py index 5c533aadcc..2e96cb799d 100644 --- a/plugins/modules/packaging/language/yarn.py +++ b/plugins/modules/packaging/language/yarn.py @@ -156,7 +156,6 @@ out: ''' import os -import re import json from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/packaging/os/apt_rpm.py b/plugins/modules/packaging/os/apt_rpm.py index 35e3ba5d45..2b6bf3e8a2 100644 --- a/plugins/modules/packaging/os/apt_rpm.py +++ b/plugins/modules/packaging/os/apt_rpm.py @@ -71,10 +71,7 @@ EXAMPLES = ''' update_cache: true ''' -import json import os -import shlex -import sys from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/packaging/os/portinstall.py b/plugins/modules/packaging/os/portinstall.py index 50e4e18646..d044756d9e 100644 --- a/plugins/modules/packaging/os/portinstall.py +++ b/plugins/modules/packaging/os/portinstall.py @@ -58,9 +58,7 @@ EXAMPLES = ''' state: absent ''' -import os import re -import sys from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six.moves import shlex_quote diff --git a/plugins/modules/packaging/os/urpmi.py b/plugins/modules/packaging/os/urpmi.py index 5f715f572f..7b1db9c415 100644 --- a/plugins/modules/packaging/os/urpmi.py +++ b/plugins/modules/packaging/os/urpmi.py @@ -81,10 +81,6 @@ EXAMPLES = ''' ''' -import os -import shlex -import sys - from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/remote_management/cobbler/cobbler_system.py b/plugins/modules/remote_management/cobbler/cobbler_system.py index 34ef8c5701..973478b627 100644 --- a/plugins/modules/remote_management/cobbler/cobbler_system.py +++ b/plugins/modules/remote_management/cobbler/cobbler_system.py @@ -145,7 +145,6 @@ system: type: dict ''' -import copy import datetime import ssl diff --git a/plugins/modules/source_control/git_config.py b/plugins/modules/source_control/git_config.py index 464e39040c..9191de0e87 100644 --- a/plugins/modules/source_control/git_config.py +++ b/plugins/modules/source_control/git_config.py @@ -160,7 +160,6 @@ config_values: alias.diffc: "diff --cached" alias.remotev: "remote -v" ''' -import os from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/source_control/github/github_repo.py b/plugins/modules/source_control/github/github_repo.py index 0549a5ad46..d01312fcfa 100644 --- a/plugins/modules/source_control/github/github_repo.py +++ b/plugins/modules/source_control/github/github_repo.py @@ -125,7 +125,6 @@ repo: import traceback from ansible.module_utils.basic import AnsibleModule, missing_required_lib -import sys GITHUB_IMP_ERR = None try: diff --git a/plugins/modules/system/alternatives.py b/plugins/modules/system/alternatives.py index 45184187b1..4566144493 100644 --- a/plugins/modules/system/alternatives.py +++ b/plugins/modules/system/alternatives.py @@ -128,7 +128,6 @@ EXAMPLES = r''' import os import re -import subprocess from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/system/beadm.py b/plugins/modules/system/beadm.py index 8f1726882b..8cb43c6cbb 100644 --- a/plugins/modules/system/beadm.py +++ b/plugins/modules/system/beadm.py @@ -137,7 +137,6 @@ force: ''' import os -import re from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/system/java_cert.py b/plugins/modules/system/java_cert.py index 89daddfcda..a78d71155a 100644 --- a/plugins/modules/system/java_cert.py +++ b/plugins/modules/system/java_cert.py @@ -176,8 +176,6 @@ cmd: import os import tempfile -import random -import string import re diff --git a/plugins/modules/web_infrastructure/jboss.py b/plugins/modules/web_infrastructure/jboss.py index 1ddd161d78..2dc82f5594 100644 --- a/plugins/modules/web_infrastructure/jboss.py +++ b/plugins/modules/web_infrastructure/jboss.py @@ -73,7 +73,6 @@ EXAMPLES = r""" RETURN = r""" # """ import os -import shutil import time from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/web_infrastructure/jenkins_plugin.py b/plugins/modules/web_infrastructure/jenkins_plugin.py index 3142e1672d..27261bf815 100644 --- a/plugins/modules/web_infrastructure/jenkins_plugin.py +++ b/plugins/modules/web_infrastructure/jenkins_plugin.py @@ -296,7 +296,6 @@ from ansible.module_utils.six.moves.urllib.parse import urlencode from ansible.module_utils.urls import fetch_url, url_argument_spec from ansible.module_utils.six import text_type, binary_type from ansible.module_utils.common.text.converters import to_native -import base64 import hashlib import io import json diff --git a/plugins/modules/web_infrastructure/rundeck_job_executions_info.py b/plugins/modules/web_infrastructure/rundeck_job_executions_info.py index e6c9239d75..2af6eb1d5f 100644 --- a/plugins/modules/web_infrastructure/rundeck_job_executions_info.py +++ b/plugins/modules/web_infrastructure/rundeck_job_executions_info.py @@ -127,9 +127,6 @@ executions: ] ''' -# Modules import -import json - from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six.moves.urllib.parse import quote from ansible_collections.community.general.plugins.module_utils.rundeck import (