Support for NIOS modules to use environment variables in provider (#49056)

* env var username/paswd support

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* including all env vars of nios doc

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* fixing default wapi version in doc-s

* fixing review comment

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>

* review statement fix

Signed-off-by: Sumit Jaiswal <sjaiswal@redhat.com>
pull/50898/head
Sumit Jaiswal 6 years ago committed by GitHub
parent bbd2e31e9f
commit 3f70518257
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

@ -70,7 +70,8 @@ options:
- Specifies the version of WAPI to use
- Value can also be specified using C(INFOBLOX_WAP_VERSION) environment
variable.
default: 1.4
- Until ansible 2.8 the default WAPI was 1.4
default: 2.1
max_results:
description:
- Specifies the maximum number of objects to be returned,

Loading…
Cancel
Save