diff options
author | Sarabraj Singh <sarsingh@redhat.com> | 2021-05-25 16:29:19 +0200 |
---|---|---|
committer | Seth Foster <fosterbseth@gmail.com> | 2021-06-08 20:33:27 +0200 |
commit | 535bbfcc39918a16d7c4ea65f7dfb81b76e5b033 (patch) | |
tree | 40cc4999dc1895ab1a4a569294ce773eb3049042 /awx_collection | |
parent | switched to semenatic versioning for version numbers in plugins, library and ... (diff) | |
download | awx-535bbfcc39918a16d7c4ea65f7dfb81b76e5b033.tar.xz awx-535bbfcc39918a16d7c4ea65f7dfb81b76e5b033.zip |
fixed validate-modules sanity tests
Diffstat (limited to 'awx_collection')
-rw-r--r-- | awx_collection/plugins/modules/credential.py | 4 | ||||
-rw-r--r-- | awx_collection/plugins/modules/export.py | 12 | ||||
-rw-r--r-- | awx_collection/plugins/modules/instance_group.py | 8 | ||||
-rw-r--r-- | awx_collection/plugins/modules/job_launch.py | 2 | ||||
-rw-r--r-- | awx_collection/plugins/modules/job_template.py | 32 | ||||
-rw-r--r-- | awx_collection/plugins/modules/license.py | 4 | ||||
-rw-r--r-- | awx_collection/plugins/modules/token.py | 2 | ||||
-rw-r--r-- | awx_collection/plugins/modules/workflow_job_template.py | 1 | ||||
-rw-r--r-- | awx_collection/plugins/modules/workflow_job_template_node.py | 2 |
9 files changed, 41 insertions, 26 deletions
diff --git a/awx_collection/plugins/modules/credential.py b/awx_collection/plugins/modules/credential.py index dfd9b572fc..170cab6fe9 100644 --- a/awx_collection/plugins/modules/credential.py +++ b/awx_collection/plugins/modules/credential.py @@ -360,10 +360,10 @@ def main(): project=dict(), ssh_key_data=dict(no_log=True), ssh_key_unlock=dict(no_log=True), - authorize=dict(type='bool'), + authorize=dict(type='bool', default=False), authorize_password=dict(no_log=True), client=dict(), - security_token=dict(), + security_token=dict(no_log=True), secret=dict(no_log=True), subscription=dict(), tenant=dict(), diff --git a/awx_collection/plugins/modules/export.py b/awx_collection/plugins/modules/export.py index 46dafe7470..72a59957e8 100644 --- a/awx_collection/plugins/modules/export.py +++ b/awx_collection/plugins/modules/export.py @@ -112,6 +112,18 @@ except ImportError: def main(): argument_spec = dict( all=dict(type='bool', default=False), + credential_types=dict(type='str'), + credentials=dict(type='str'), + execution_environments=dict(type='str'), + inventory=dict(type='str'), + inventory_sources=dict(type='str'), + job_templates=dict(type='str'), + notification_templates=dict(type='str'), + organizations=dict(type='str'), + projects=dict(type='str'), + teams=dict(type='str'), + users=dict(type='str'), + workflow_job_templates=dict(type='str'), ) # We are not going to raise an error here because the __init__ method of ControllerAWXKitModule will do that for us diff --git a/awx_collection/plugins/modules/instance_group.py b/awx_collection/plugins/modules/instance_group.py index bd511dbe13..e30db12d6a 100644 --- a/awx_collection/plugins/modules/instance_group.py +++ b/awx_collection/plugins/modules/instance_group.py @@ -58,6 +58,7 @@ options: - List of exact-match Instances that will be assigned to this group required: False type: list + elements: str pod_spec_override: description: - A custom Kubernetes or OpenShift Pod specification. @@ -68,6 +69,7 @@ options: - The instances associated with this instance_group required: False type: list + elements: str state: description: - Desired state of the resource. @@ -89,12 +91,12 @@ def main(): name=dict(required=True), new_name=dict(), credential=dict(), - is_container_group=dict(type='bool', default=False), + is_container_group=dict(type='bool', default=None), policy_instance_percentage=dict(type='int', default='0'), policy_instance_minimum=dict(type='int', default='0'), - policy_instance_list=dict(type='list'), + policy_instance_list=dict(type='list', elements='str'), pod_spec_override=dict(), - instances=dict(required=False, type="list", default=None), + instances=dict(required=False, type="list", elements='str', default=None), state=dict(choices=['present', 'absent'], default='present'), ) diff --git a/awx_collection/plugins/modules/job_launch.py b/awx_collection/plugins/modules/job_launch.py index 193e2c1e61..728609d11b 100644 --- a/awx_collection/plugins/modules/job_launch.py +++ b/awx_collection/plugins/modules/job_launch.py @@ -164,7 +164,7 @@ def main(): skip_tags=dict(type='list', elements='str'), verbosity=dict(type='int', choices=[0, 1, 2, 3, 4, 5]), diff_mode=dict(type='bool'), - credential_passwords=dict(type='dict'), + credential_passwords=dict(type='dict', no_log=True), wait=dict(default=False, type='bool'), interval=dict(default=1.0, type='float'), timeout=dict(default=None, type='int'), diff --git a/awx_collection/plugins/modules/job_template.py b/awx_collection/plugins/modules/job_template.py index 52010b48b7..7a6086d277 100644 --- a/awx_collection/plugins/modules/job_template.py +++ b/awx_collection/plugins/modules/job_template.py @@ -388,24 +388,24 @@ def main(): skip_tags=dict(), start_at_task=dict(), timeout=dict(type='int', default=0), - use_fact_cache=dict(type='bool', aliases=['fact_caching_enabled']), - host_config_key=dict(), - ask_diff_mode_on_launch=dict(type='bool', aliases=['ask_diff_mode']), - ask_variables_on_launch=dict(type='bool', aliases=['ask_extra_vars']), - ask_limit_on_launch=dict(type='bool', aliases=['ask_limit']), - ask_tags_on_launch=dict(type='bool', aliases=['ask_tags']), - ask_skip_tags_on_launch=dict(type='bool', aliases=['ask_skip_tags']), - ask_job_type_on_launch=dict(type='bool', aliases=['ask_job_type']), - ask_verbosity_on_launch=dict(type='bool', aliases=['ask_verbosity']), - ask_inventory_on_launch=dict(type='bool', aliases=['ask_inventory']), - ask_credential_on_launch=dict(type='bool', aliases=['ask_credential']), - survey_enabled=dict(type='bool'), + use_fact_cache=dict(type='bool', aliases=['fact_caching_enabled'], default=False), + host_config_key=dict(no_log=True), + ask_diff_mode_on_launch=dict(type='bool', aliases=['ask_diff_mode'], default=False), + ask_variables_on_launch=dict(type='bool', aliases=['ask_extra_vars'], default=False), + ask_limit_on_launch=dict(type='bool', aliases=['ask_limit'], default=False), + ask_tags_on_launch=dict(type='bool', aliases=['ask_tags'], default=False), + ask_skip_tags_on_launch=dict(type='bool', aliases=['ask_skip_tags'], default=False), + ask_job_type_on_launch=dict(type='bool', aliases=['ask_job_type'], default=False), + ask_verbosity_on_launch=dict(type='bool', aliases=['ask_verbosity'], default=False), + ask_inventory_on_launch=dict(type='bool', aliases=['ask_inventory'], default=False), + ask_credential_on_launch=dict(type='bool', aliases=['ask_credential'], default=False), + survey_enabled=dict(type='bool', default=False), survey_spec=dict(type="dict"), - become_enabled=dict(type='bool'), - diff_mode=dict(type='bool', aliases=['diff_mode_enabled']), - allow_simultaneous=dict(type='bool', aliases=['concurrent_jobs_enabled']), + become_enabled=dict(type='bool', default=False), + diff_mode=dict(type='bool', aliases=['diff_mode_enabled'], default=False), + allow_simultaneous=dict(type='bool', aliases=['concurrent_jobs_enabled'], default=False), scm_branch=dict(), - ask_scm_branch_on_launch=dict(type='bool'), + ask_scm_branch_on_launch=dict(type='bool', default=False), job_slice_count=dict(type='int', default='1'), webhook_service=dict(choices=['github', 'gitlab', '']), webhook_credential=dict(), diff --git a/awx_collection/plugins/modules/license.py b/awx_collection/plugins/modules/license.py index 9325fc0359..6ad3544d4e 100644 --- a/awx_collection/plugins/modules/license.py +++ b/awx_collection/plugins/modules/license.py @@ -29,7 +29,6 @@ options: description: - By default, the license manifest will only be applied if Tower is currently unlicensed or trial licensed. When force=true, the license is always applied. - required: True type: bool default: 'False' extends_documentation_fragment: awx.awx.auth @@ -52,7 +51,8 @@ def main(): module = ControllerAPIModule( argument_spec=dict( manifest=dict(type='str', required=True), - force=dict(type='bool', required=False), + eula_accepted=dict(type='bool', required=True), + force=dict(type='bool', default=False), ), ) diff --git a/awx_collection/plugins/modules/token.py b/awx_collection/plugins/modules/token.py index d225f10f91..0b3016e771 100644 --- a/awx_collection/plugins/modules/token.py +++ b/awx_collection/plugins/modules/token.py @@ -136,7 +136,7 @@ def main(): description=dict(), application=dict(), scope=dict(choices=['read', 'write'], default='write'), - existing_token=dict(type='dict'), + existing_token=dict(type='dict', no_log=True), existing_token_id=dict(), state=dict(choices=['present', 'absent'], default='present'), ) diff --git a/awx_collection/plugins/modules/workflow_job_template.py b/awx_collection/plugins/modules/workflow_job_template.py index 741397b99f..8a4c5d75ec 100644 --- a/awx_collection/plugins/modules/workflow_job_template.py +++ b/awx_collection/plugins/modules/workflow_job_template.py @@ -148,6 +148,7 @@ options: description: - A json list of nodes and their coresponding options. The following suboptions describe a single node. type: list + elements: dict suboptions: extra_data: description: diff --git a/awx_collection/plugins/modules/workflow_job_template_node.py b/awx_collection/plugins/modules/workflow_job_template_node.py index 9c950d3465..82dddb07e4 100644 --- a/awx_collection/plugins/modules/workflow_job_template_node.py +++ b/awx_collection/plugins/modules/workflow_job_template_node.py @@ -255,7 +255,7 @@ def main(): required_if = [ ['state', 'absent', ['identifier']], ['state', 'present', ['identifier']], - ['state', 'present', ['unified_job_template', 'approval_node', 'success_nodes', 'always_nodes', 'failure_nodes'], 'true'], + ['state', 'present', ['unified_job_template', 'approval_node', 'success_nodes', 'always_nodes', 'failure_nodes'], True], ] # Create a module for ourselves |