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

stacki_host - configured params to use fallback instead of default (#2072) (#2076)

* configuredd params to use fallback instead of default

* added changelog fragment

(cherry picked from commit 5fc56676c2)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2021-03-21 15:43:12 +01:00 committed by GitHub
parent 81cef0bd05
commit e1ac1fa6db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 8 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- stacki_host - replaced ``default`` to environment variables with ``fallback`` to them (https://github.com/ansible-collections/community.general/pull/2072).

View file

@ -53,6 +53,7 @@ options:
description:
- Set value to True to force node into install state if it already exists in stacki.
type: bool
default: no
state:
description:
- Set value to the desired state for the specified host.
@ -103,9 +104,8 @@ stdout_lines:
'''
import json
import os
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.basic import AnsibleModule, env_fallback
from ansible.module_utils.six.moves.urllib.parse import urlencode
from ansible.module_utils.urls import fetch_url
@ -235,9 +235,9 @@ def main():
prim_intf_ip=dict(type='str'),
network=dict(type='str', default='private'),
prim_intf_mac=dict(type='str'),
stacki_user=dict(type='str', required=True, default=os.environ.get('stacki_user')),
stacki_password=dict(type='str', required=True, default=os.environ.get('stacki_password'), no_log=True),
stacki_endpoint=dict(type='str', required=True, default=os.environ.get('stacki_endpoint')),
stacki_user=dict(type='str', required=True, fallback=(env_fallback, ['stacki_user'])),
stacki_password=dict(type='str', required=True, fallback=(env_fallback, ['stacki_password']), no_log=True),
stacki_endpoint=dict(type='str', required=True, fallback=(env_fallback, ['stacki_endpoint'])),
force_install=dict(type='bool', default=False),
),
supports_check_mode=False,

View file

@ -167,7 +167,6 @@ plugins/modules/remote_management/oneview/oneview_san_manager.py validate-module
plugins/modules/remote_management/oneview/oneview_san_manager_info.py validate-modules:parameter-type-not-in-doc
plugins/modules/remote_management/oneview/oneview_san_manager_info.py validate-modules:undocumented-parameter
plugins/modules/remote_management/stacki/stacki_host.py validate-modules:doc-default-does-not-match-spec
plugins/modules/remote_management/stacki/stacki_host.py validate-modules:no-default-for-required-parameter
plugins/modules/remote_management/stacki/stacki_host.py validate-modules:parameter-type-not-in-doc
plugins/modules/remote_management/stacki/stacki_host.py validate-modules:undocumented-parameter
plugins/modules/source_control/github/github_deploy_key.py validate-modules:parameter-invalid

View file

@ -166,7 +166,6 @@ plugins/modules/remote_management/oneview/oneview_san_manager.py validate-module
plugins/modules/remote_management/oneview/oneview_san_manager_info.py validate-modules:parameter-type-not-in-doc
plugins/modules/remote_management/oneview/oneview_san_manager_info.py validate-modules:undocumented-parameter
plugins/modules/remote_management/stacki/stacki_host.py validate-modules:doc-default-does-not-match-spec
plugins/modules/remote_management/stacki/stacki_host.py validate-modules:no-default-for-required-parameter
plugins/modules/remote_management/stacki/stacki_host.py validate-modules:parameter-type-not-in-doc
plugins/modules/remote_management/stacki/stacki_host.py validate-modules:undocumented-parameter
plugins/modules/source_control/github/github_deploy_key.py validate-modules:parameter-invalid

View file

@ -198,7 +198,6 @@ plugins/modules/remote_management/oneview/oneview_san_manager.py validate-module
plugins/modules/remote_management/oneview/oneview_san_manager_info.py validate-modules:parameter-type-not-in-doc
plugins/modules/remote_management/oneview/oneview_san_manager_info.py validate-modules:undocumented-parameter
plugins/modules/remote_management/stacki/stacki_host.py validate-modules:doc-default-does-not-match-spec
plugins/modules/remote_management/stacki/stacki_host.py validate-modules:no-default-for-required-parameter
plugins/modules/remote_management/stacki/stacki_host.py validate-modules:parameter-type-not-in-doc
plugins/modules/remote_management/stacki/stacki_host.py validate-modules:undocumented-parameter
plugins/modules/source_control/github/github_deploy_key.py validate-modules:parameter-invalid