|
|
@ -31,6 +31,7 @@ from functools import partial
|
|
|
|
from ansible.module_utils._text import to_native
|
|
|
|
from ansible.module_utils._text import to_native
|
|
|
|
from ansible.module_utils.six import iteritems
|
|
|
|
from ansible.module_utils.six import iteritems
|
|
|
|
from ansible.module_utils._text import to_text
|
|
|
|
from ansible.module_utils._text import to_text
|
|
|
|
|
|
|
|
from ansible.module_utils.basic import env_fallback
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
from infoblox_client.connector import Connector
|
|
|
|
from infoblox_client.connector import Connector
|
|
|
@ -60,17 +61,17 @@ NIOS_IPV6_FIXED_ADDRESS = 'ipv6fixedaddress'
|
|
|
|
NIOS_NEXT_AVAILABLE_IP = 'func:nextavailableip'
|
|
|
|
NIOS_NEXT_AVAILABLE_IP = 'func:nextavailableip'
|
|
|
|
|
|
|
|
|
|
|
|
NIOS_PROVIDER_SPEC = {
|
|
|
|
NIOS_PROVIDER_SPEC = {
|
|
|
|
'host': dict(),
|
|
|
|
'host': dict(fallback=(env_fallback, ['INFOBLOX_HOST'])),
|
|
|
|
'username': dict(),
|
|
|
|
'username': dict(fallback=(env_fallback, ['INFOBLOX_USERNAME'])),
|
|
|
|
'password': dict(no_log=True),
|
|
|
|
'password': dict(fallback=(env_fallback, ['INFOBLOX_PASSWORD']), no_log=True),
|
|
|
|
'ssl_verify': dict(type='bool', default=False),
|
|
|
|
'ssl_verify': dict(type='bool', default=False, fallback=(env_fallback, ['INFOBLOX_SSL_VERIFY'])),
|
|
|
|
'silent_ssl_warnings': dict(type='bool', default=True),
|
|
|
|
'silent_ssl_warnings': dict(type='bool', default=True),
|
|
|
|
'http_request_timeout': dict(type='int', default=10),
|
|
|
|
'http_request_timeout': dict(type='int', default=10, fallback=(env_fallback, ['INFOBLOX_HTTP_REQUEST_TIMEOUT'])),
|
|
|
|
'http_pool_connections': dict(type='int', default=10),
|
|
|
|
'http_pool_connections': dict(type='int', default=10),
|
|
|
|
'http_pool_maxsize': dict(type='int', default=10),
|
|
|
|
'http_pool_maxsize': dict(type='int', default=10),
|
|
|
|
'max_retries': dict(type='int', default=3),
|
|
|
|
'max_retries': dict(type='int', default=3, fallback=(env_fallback, ['INFOBLOX_MAX_RETRIES'])),
|
|
|
|
'wapi_version': dict(default='2.1'),
|
|
|
|
'wapi_version': dict(default='2.1', fallback=(env_fallback, ['INFOBLOX_WAP_VERSION'])),
|
|
|
|
'max_results': dict(type='int', default=1000)
|
|
|
|
'max_results': dict(type='int', default=1000, fallback=(env_fallback, ['INFOBLOX_MAX_RETRIES']))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|