Clean up unneeded urllib2 imports

This commit is contained in:
Toshio Kuratomi 2015-07-20 23:02:44 -07:00
parent d5dd5f461f
commit 79173ac18d
9 changed files with 22 additions and 25 deletions

View file

@ -166,7 +166,6 @@ EXAMPLES = '''
''' '''
import sys import sys
import urllib2
try: try:
import json import json
@ -179,7 +178,7 @@ try:
python_consul_installed = True python_consul_installed = True
except ImportError, e: except ImportError, e:
python_consul_installed = False python_consul_installed = False
def register_with_consul(module): def register_with_consul(module):
state = module.params.get('state') state = module.params.get('state')
@ -503,4 +502,5 @@ def main():
# import module snippets # import module snippets
from ansible.module_utils.basic import * from ansible.module_utils.basic import *
main() if __name__ == '__main__':
main()

View file

@ -92,7 +92,6 @@ EXAMPLES = '''
''' '''
import sys import sys
import urllib2
try: try:
import consul import consul
@ -318,4 +317,5 @@ def main():
# import module snippets # import module snippets
from ansible.module_utils.basic import * from ansible.module_utils.basic import *
main() if __name__ == '__main__':
main()

View file

@ -121,7 +121,6 @@ EXAMPLES = '''
''' '''
import sys import sys
import urllib2
try: try:
import json import json
@ -261,4 +260,5 @@ def main():
# import module snippets # import module snippets
from ansible.module_utils.basic import * from ansible.module_utils.basic import *
main() if __name__ == '__main__':
main()

View file

@ -114,7 +114,6 @@ EXAMPLES = '''
''' '''
import sys import sys
import urllib2
try: try:
import consul import consul
@ -266,4 +265,5 @@ def main():
# import module snippets # import module snippets
from ansible.module_utils.basic import * from ansible.module_utils.basic import *
main() if __name__ == '__main__':
main()

View file

@ -97,7 +97,6 @@ EXAMPLES = '''
- riak: wait_for_service=kv - riak: wait_for_service=kv
''' '''
import urllib2
import time import time
import socket import socket
import sys import sys
@ -254,5 +253,5 @@ def main():
# import module snippets # import module snippets
from ansible.module_utils.basic import * from ansible.module_utils.basic import *
from ansible.module_utils.urls import * from ansible.module_utils.urls import *
if __name__ == '__main__':
main() main()

View file

@ -59,7 +59,7 @@ options:
choices: ['yes', 'no'] choices: ['yes', 'no']
# informational: requirements for nodes # informational: requirements for nodes
requirements: [ urllib, urllib2 ] requirements: [ ]
''' '''
EXAMPLES = ''' EXAMPLES = '''
@ -168,5 +168,5 @@ def main():
# import module snippets # import module snippets
from ansible.module_utils.basic import * from ansible.module_utils.basic import *
from ansible.module_utils.urls import * from ansible.module_utils.urls import *
if __name__ == '__main__':
main() main()

View file

@ -38,7 +38,6 @@ author: "curtis (@ccollicutt)"
requirements: requirements:
- Boundary API access - Boundary API access
- bprobe is required to send data, but not to register a meter - bprobe is required to send data, but not to register a meter
- Python urllib2
options: options:
name: name:
description: description:
@ -252,5 +251,6 @@ def main():
# import module snippets # import module snippets
from ansible.module_utils.basic import * from ansible.module_utils.basic import *
from ansible.module_utils.urls import * from ansible.module_utils.urls import *
main() if __name__ == '__main__':
main()

View file

@ -16,7 +16,7 @@ description:
version_added: "1.3" version_added: "1.3"
author: "Artūras `arturaz` Šlajus (@arturaz)" author: "Artūras `arturaz` Šlajus (@arturaz)"
notes: [] notes: []
requirements: [urllib2] requirements: []
options: options:
api_key: api_key:
description: ["Your DataDog API key."] description: ["Your DataDog API key."]
@ -139,5 +139,5 @@ def post_event(module):
# import module snippets # import module snippets
from ansible.module_utils.basic import * from ansible.module_utils.basic import *
from ansible.module_utils.urls import * from ansible.module_utils.urls import *
if __name__ == '__main__':
main() main()

View file

@ -31,9 +31,7 @@ description:
author: "Mischa Peters (@mischapeters)" author: "Mischa Peters (@mischapeters)"
notes: notes:
- Requires A10 Networks aXAPI 2.1 - Requires A10 Networks aXAPI 2.1
requirements: requirements: []
- urllib2
- re
options: options:
host: host:
description: description:
@ -294,6 +292,6 @@ def main():
from ansible.module_utils.basic import * from ansible.module_utils.basic import *
from ansible.module_utils.urls import * from ansible.module_utils.urls import *
from ansible.module_utils.a10 import * from ansible.module_utils.a10 import *
if __name__ == '__main__':
main() main()