mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Clean up unneeded urllib2 imports
This commit is contained in:
parent
dccee8bcd4
commit
a4859e1087
9 changed files with 22 additions and 25 deletions
|
@ -166,7 +166,6 @@ EXAMPLES = '''
|
|||
'''
|
||||
|
||||
import sys
|
||||
import urllib2
|
||||
|
||||
try:
|
||||
import json
|
||||
|
@ -179,7 +178,7 @@ try:
|
|||
python_consul_installed = True
|
||||
except ImportError, e:
|
||||
python_consul_installed = False
|
||||
|
||||
|
||||
def register_with_consul(module):
|
||||
|
||||
state = module.params.get('state')
|
||||
|
@ -503,4 +502,5 @@ def main():
|
|||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
main()
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -92,7 +92,6 @@ EXAMPLES = '''
|
|||
'''
|
||||
|
||||
import sys
|
||||
import urllib2
|
||||
|
||||
try:
|
||||
import consul
|
||||
|
@ -318,4 +317,5 @@ def main():
|
|||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
main()
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -121,7 +121,6 @@ EXAMPLES = '''
|
|||
'''
|
||||
|
||||
import sys
|
||||
import urllib2
|
||||
|
||||
try:
|
||||
import json
|
||||
|
@ -261,4 +260,5 @@ def main():
|
|||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
main()
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -114,7 +114,6 @@ EXAMPLES = '''
|
|||
'''
|
||||
|
||||
import sys
|
||||
import urllib2
|
||||
|
||||
try:
|
||||
import consul
|
||||
|
@ -266,4 +265,5 @@ def main():
|
|||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
main()
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -97,7 +97,6 @@ EXAMPLES = '''
|
|||
- riak: wait_for_service=kv
|
||||
'''
|
||||
|
||||
import urllib2
|
||||
import time
|
||||
import socket
|
||||
import sys
|
||||
|
@ -254,5 +253,5 @@ def main():
|
|||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
from ansible.module_utils.urls import *
|
||||
|
||||
main()
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -59,7 +59,7 @@ options:
|
|||
choices: ['yes', 'no']
|
||||
|
||||
# informational: requirements for nodes
|
||||
requirements: [ urllib, urllib2 ]
|
||||
requirements: [ ]
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
|
@ -168,5 +168,5 @@ def main():
|
|||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
from ansible.module_utils.urls import *
|
||||
|
||||
main()
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -38,7 +38,6 @@ author: "curtis (@ccollicutt)"
|
|||
requirements:
|
||||
- Boundary API access
|
||||
- bprobe is required to send data, but not to register a meter
|
||||
- Python urllib2
|
||||
options:
|
||||
name:
|
||||
description:
|
||||
|
@ -252,5 +251,6 @@ def main():
|
|||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
from ansible.module_utils.urls import *
|
||||
main()
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ description:
|
|||
version_added: "1.3"
|
||||
author: "Artūras `arturaz` Šlajus (@arturaz)"
|
||||
notes: []
|
||||
requirements: [urllib2]
|
||||
requirements: []
|
||||
options:
|
||||
api_key:
|
||||
description: ["Your DataDog API key."]
|
||||
|
@ -139,5 +139,5 @@ def post_event(module):
|
|||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
from ansible.module_utils.urls import *
|
||||
|
||||
main()
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -31,9 +31,7 @@ description:
|
|||
author: "Mischa Peters (@mischapeters)"
|
||||
notes:
|
||||
- Requires A10 Networks aXAPI 2.1
|
||||
requirements:
|
||||
- urllib2
|
||||
- re
|
||||
requirements: []
|
||||
options:
|
||||
host:
|
||||
description:
|
||||
|
@ -294,6 +292,6 @@ def main():
|
|||
from ansible.module_utils.basic import *
|
||||
from ansible.module_utils.urls import *
|
||||
from ansible.module_utils.a10 import *
|
||||
|
||||
main()
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
|
|
Loading…
Reference in a new issue