1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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>
This commit is contained in:
Sumit Jaiswal 2019-01-14 23:25:24 +05:30 committed by GitHub
parent bbd2e31e9f
commit 3f70518257
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 9 deletions

View file

@ -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']))
}

View file

@ -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,