Merge pull request #6472 from AlanCoding/no_required

Remove field properties which are default values anyway

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot]
2020-04-07 02:57:19 +00:00
committed by GitHub
25 changed files with 117 additions and 206 deletions

View File

@@ -40,13 +40,11 @@ options:
organization: organization:
description: description:
- Organization that should own the credential. - Organization that should own the credential.
required: False
type: str type: str
credential_type: credential_type:
description: description:
- Name of credential type. - Name of credential type.
- Will be preferred over kind - Will be preferred over kind
required: False
version_added: "2.10" version_added: "2.10"
type: str type: str
inputs: inputs:
@@ -55,7 +53,6 @@ options:
Credential inputs where the keys are var names used in templating. Credential inputs where the keys are var names used in templating.
Refer to the Ansible Tower documentation for example syntax. Refer to the Ansible Tower documentation for example syntax.
- Any fields in this dict will take prescedence over any fields mentioned below (i.e. host, username, etc) - Any fields in this dict will take prescedence over any fields mentioned below (i.e. host, username, etc)
required: False
version_added: "2.9" version_added: "2.9"
type: dict type: dict
user: user:
@@ -100,7 +97,6 @@ options:
description: description:
- SSH private key content. To extract the content from a file path, use the lookup function (see examples). - SSH private key content. To extract the content from a file path, use the lookup function (see examples).
- Deprecated, please use inputs - Deprecated, please use inputs
required: False
type: str type: str
ssh_key_unlock: ssh_key_unlock:
description: description:

View File

@@ -32,7 +32,6 @@ options:
description: description:
description: description:
- The description of the credential type to give more detail about it. - The description of the credential type to give more detail about it.
required: False
type: str type: str
kind: kind:
description: description:
@@ -41,33 +40,28 @@ options:
net can be used for creating credential types. Refer to the Ansible net can be used for creating credential types. Refer to the Ansible
for more information. for more information.
choices: [ 'ssh', 'vault', 'net', 'scm', 'cloud', 'insights' ] choices: [ 'ssh', 'vault', 'net', 'scm', 'cloud', 'insights' ]
required: False
type: str type: str
inputs: inputs:
description: description:
- >- - >-
Enter inputs using either JSON or YAML syntax. Refer to the Ansible Enter inputs using either JSON or YAML syntax. Refer to the Ansible
Tower documentation for example syntax. Tower documentation for example syntax.
required: False
type: dict type: dict
injectors: injectors:
description: description:
- >- - >-
Enter injectors using either JSON or YAML syntax. Refer to the Enter injectors using either JSON or YAML syntax. Refer to the
Ansible Tower documentation for example syntax. Ansible Tower documentation for example syntax.
required: False
type: dict type: dict
state: state:
description: description:
- Desired state of the resource. - Desired state of the resource.
required: False
default: "present" default: "present"
choices: ["present", "absent"] choices: ["present", "absent"]
type: str type: str
tower_oauthtoken: tower_oauthtoken:
description: description:
- The Tower OAuth token to use. - The Tower OAuth token to use.
required: False
type: str type: str
version_added: "3.7" version_added: "3.7"
extends_documentation_fragment: awx.awx.auth extends_documentation_fragment: awx.awx.auth
@@ -109,15 +103,15 @@ def main():
# Any additional arguments that are not fields of the item can be added here # Any additional arguments that are not fields of the item can be added here
argument_spec = dict( argument_spec = dict(
name=dict(required=True), name=dict(required=True),
description=dict(required=False), description=dict(),
kind=dict(required=False, choices=list(KIND_CHOICES.keys())), kind=dict(choices=list(KIND_CHOICES.keys())),
inputs=dict(type='dict', required=False), inputs=dict(type='dict'),
injectors=dict(type='dict', required=False), injectors=dict(type='dict'),
state=dict(choices=['present', 'absent'], default='present'), state=dict(choices=['present', 'absent'], default='present'),
) )
# Create a module for ourselves # Create a module for ourselves
module = TowerModule(argument_spec=argument_spec, supports_check_mode=True) module = TowerModule(argument_spec=argument_spec)
# Extract our parameters # Extract our parameters
name = module.params.get('name') name = module.params.get('name')

View File

@@ -44,13 +44,11 @@ options:
hosts: hosts:
description: description:
- List of hosts that should be put in this group. - List of hosts that should be put in this group.
required: False
type: list type: list
elements: str elements: str
children: children:
description: description:
- List of groups that should be nested inside in this group. - List of groups that should be nested inside in this group.
required: False
type: list type: list
elements: str elements: str
aliases: aliases:
@@ -64,13 +62,11 @@ options:
new_name: new_name:
description: description:
- A new name for this group (for renaming) - A new name for this group (for renaming)
required: False
type: str type: str
version_added: "3.7" version_added: "3.7"
tower_oauthtoken: tower_oauthtoken:
description: description:
- The Tower OAuth token to use. - The Tower OAuth token to use.
required: False
type: str type: str
version_added: "3.7" version_added: "3.7"
extends_documentation_fragment: awx.awx.auth extends_documentation_fragment: awx.awx.auth
@@ -95,17 +91,17 @@ def main():
# Any additional arguments that are not fields of the item can be added here # Any additional arguments that are not fields of the item can be added here
argument_spec = dict( argument_spec = dict(
name=dict(required=True), name=dict(required=True),
new_name=dict(required=False), new_name=dict(),
description=dict(required=False), description=dict(),
inventory=dict(required=True), inventory=dict(required=True),
variables=dict(type='dict', required=False), variables=dict(type='dict'),
hosts=dict(type='list', elements='str'), hosts=dict(type='list', elements='str'),
children=dict(type='list', elements='str', aliases=['groups']), children=dict(type='list', elements='str', aliases=['groups']),
state=dict(choices=['present', 'absent'], default='present'), state=dict(choices=['present', 'absent'], default='present'),
) )
# Create a module for ourselves # Create a module for ourselves
module = TowerModule(argument_spec=argument_spec, supports_check_mode=True) module = TowerModule(argument_spec=argument_spec)
# Extract our parameters # Extract our parameters
name = module.params.get('name') name = module.params.get('name')

View File

@@ -31,7 +31,6 @@ options:
new_name: new_name:
description: description:
- To use when changing a hosts's name. - To use when changing a hosts's name.
required: False
type: str type: str
version_added: "3.7" version_added: "3.7"
description: description:
@@ -61,7 +60,6 @@ options:
tower_oauthtoken: tower_oauthtoken:
description: description:
- The Tower OAuth token to use. - The Tower OAuth token to use.
required: False
type: str type: str
version_added: "3.7" version_added: "3.7"
extends_documentation_fragment: awx.awx.auth extends_documentation_fragment: awx.awx.auth
@@ -89,16 +87,16 @@ def main():
# Any additional arguments that are not fields of the item can be added here # Any additional arguments that are not fields of the item can be added here
argument_spec = dict( argument_spec = dict(
name=dict(required=True), name=dict(required=True),
new_name=dict(required=False), new_name=dict(),
description=dict(required=False), description=dict(),
inventory=dict(required=True), inventory=dict(required=True),
enabled=dict(type='bool', default=True), enabled=dict(type='bool', default=True),
variables=dict(type='dict', required=False), variables=dict(type='dict'),
state=dict(choices=['present', 'absent'], default='present'), state=dict(choices=['present', 'absent'], default='present'),
) )
# Create a module for ourselves # Create a module for ourselves
module = TowerModule(argument_spec=argument_spec, supports_check_mode=True) module = TowerModule(argument_spec=argument_spec)
# Extract our parameters # Extract our parameters
name = module.params.get('name') name = module.params.get('name')

View File

@@ -40,7 +40,6 @@ options:
variables: variables:
description: description:
- Inventory variables. - Inventory variables.
required: False
type: dict type: dict
kind: kind:
description: description:
@@ -63,7 +62,6 @@ options:
tower_oauthtoken: tower_oauthtoken:
description: description:
- The Tower OAuth token to use. - The Tower OAuth token to use.
required: False
type: str type: str
version_added: "3.7" version_added: "3.7"
extends_documentation_fragment: awx.awx.auth extends_documentation_fragment: awx.awx.auth
@@ -89,16 +87,16 @@ def main():
# Any additional arguments that are not fields of the item can be added here # Any additional arguments that are not fields of the item can be added here
argument_spec = dict( argument_spec = dict(
name=dict(required=True), name=dict(required=True),
description=dict(required=False), description=dict(),
organization=dict(required=True), organization=dict(required=True),
variables=dict(type='dict', required=False), variables=dict(type='dict'),
kind=dict(choices=['', 'smart'], default=''), kind=dict(choices=['', 'smart'], default=''),
host_filter=dict(), host_filter=dict(),
state=dict(choices=['present', 'absent'], default='present'), state=dict(choices=['present', 'absent'], default='present'),
) )
# Create a module for ourselves # Create a module for ourselves
module = TowerModule(argument_spec=argument_spec, supports_check_mode=True) module = TowerModule(argument_spec=argument_spec)
# Extract our parameters # Extract our parameters
name = module.params.get('name') name = module.params.get('name')

View File

@@ -31,7 +31,6 @@ options:
new_name: new_name:
description: description:
- A new name for this assets (will rename the asset) - A new name for this assets (will rename the asset)
required: False
type: str type: str
version_added: "3.7" version_added: "3.7"
description: description:
@@ -48,7 +47,6 @@ options:
- The source to use for this group. - The source to use for this group.
choices: [ "scm", "ec2", "gce", "azure_rm", "vmware", "satellite6", "cloudforms", "openstack", "rhv", "tower", "custom" ] choices: [ "scm", "ec2", "gce", "azure_rm", "vmware", "satellite6", "cloudforms", "openstack", "rhv", "tower", "custom" ]
type: str type: str
required: False
source_path: source_path:
description: description:
- For an SCM based inventory source, the source path points to the file within the repo to use as an inventory. - For an SCM based inventory source, the source path points to the file within the repo to use as an inventory.
@@ -57,7 +55,6 @@ options:
description: description:
- Inventory script to be used when group type is C(custom). - Inventory script to be used when group type is C(custom).
type: str type: str
required: False
source_vars: source_vars:
description: description:
- The variables or environment fields to apply to this source type. - The variables or environment fields to apply to this source type.
@@ -92,7 +89,6 @@ options:
description: description:
- Local absolute file path containing a custom Python virtualenv to use. - Local absolute file path containing a custom Python virtualenv to use.
type: str type: str
required: False
default: '' default: ''
timeout: timeout:
description: The amount of time (in seconds) to run before the task is canceled. description: The amount of time (in seconds) to run before the task is canceled.
@@ -126,7 +122,6 @@ options:
tower_oauthtoken: tower_oauthtoken:
description: description:
- The Tower OAuth token to use. - The Tower OAuth token to use.
required: False
type: str type: str
version_added: "3.7" version_added: "3.7"
extends_documentation_fragment: awx.awx.auth extends_documentation_fragment: awx.awx.auth
@@ -153,17 +148,17 @@ def main():
# Any additional arguments that are not fields of the item can be added here # Any additional arguments that are not fields of the item can be added here
argument_spec = dict( argument_spec = dict(
name=dict(required=True), name=dict(required=True),
new_name=dict(type='str'), new_name=dict(),
description=dict(required=False), description=dict(),
inventory=dict(required=True), inventory=dict(required=True),
# #
# How do we handle manual and file? Tower does not seem to be able to activate them # How do we handle manual and file? Tower does not seem to be able to activate them
# #
source=dict(choices=["scm", "ec2", "gce", source=dict(choices=["scm", "ec2", "gce",
"azure_rm", "vmware", "satellite6", "cloudforms", "azure_rm", "vmware", "satellite6", "cloudforms",
"openstack", "rhv", "tower", "custom"], required=False), "openstack", "rhv", "tower", "custom"]),
source_path=dict(), source_path=dict(),
source_script=dict(required=False), source_script=dict(),
source_vars=dict(type='dict'), source_vars=dict(type='dict'),
credential=dict(), credential=dict(),
source_regions=dict(), source_regions=dict(),
@@ -171,12 +166,12 @@ def main():
group_by=dict(), group_by=dict(),
overwrite=dict(type='bool'), overwrite=dict(type='bool'),
overwrite_vars=dict(type='bool'), overwrite_vars=dict(type='bool'),
custom_virtualenv=dict(type='str', default=''), custom_virtualenv=dict(default=''),
timeout=dict(type='int'), timeout=dict(type='int'),
verbosity=dict(type='int', choices=[0, 1, 2]), verbosity=dict(type='int', choices=[0, 1, 2]),
update_on_launch=dict(type='bool'), update_on_launch=dict(type='bool'),
update_cache_timeout=dict(type='int'), update_cache_timeout=dict(type='int'),
source_project=dict(type='str'), source_project=dict(),
update_on_project_update=dict(type='bool'), update_on_project_update=dict(type='bool'),
state=dict(choices=['present', 'absent'], default='present'), state=dict(choices=['present', 'absent'], default='present'),
) )

View File

@@ -36,7 +36,6 @@ options:
tower_oauthtoken: tower_oauthtoken:
description: description:
- The Tower OAuth token to use. - The Tower OAuth token to use.
required: False
type: str type: str
version_added: "3.7" version_added: "3.7"
extends_documentation_fragment: awx.awx.auth extends_documentation_fragment: awx.awx.auth

View File

@@ -90,7 +90,6 @@ options:
tower_oauthtoken: tower_oauthtoken:
description: description:
- The Tower OAuth token to use. - The Tower OAuth token to use.
required: False
type: str type: str
version_added: "3.7" version_added: "3.7"
extends_documentation_fragment: awx.awx.auth extends_documentation_fragment: awx.awx.auth
@@ -142,23 +141,23 @@ from ..module_utils.tower_api import TowerModule
def main(): def main():
# Any additional arguments that are not fields of the item can be added here # Any additional arguments that are not fields of the item can be added here
argument_spec = dict( argument_spec = dict(
name=dict(type='str', required=True, aliases=['job_template']), name=dict(required=True, aliases=['job_template']),
job_type=dict(type='str', choices=['run', 'check']), job_type=dict(choices=['run', 'check']),
inventory=dict(type='str', default=None), inventory=dict(default=None),
# Credentials will be a str instead of a list for backwards compatability # Credentials will be a str instead of a list for backwards compatability
credentials=dict(type='list', default=None, aliases=['credential'], elements='str'), credentials=dict(type='list', default=None, aliases=['credential'], elements='str'),
limit=dict(), limit=dict(),
tags=dict(type='list', elements='str'), tags=dict(type='list', elements='str'),
extra_vars=dict(type='dict', required=False), extra_vars=dict(type='dict'),
scm_branch=dict(type='str', required=False), scm_branch=dict(),
skip_tags=dict(type='list', required=False, elements='str'), skip_tags=dict(type='list', elements='str'),
verbosity=dict(type='int', required=False, choices=[0, 1, 2, 3, 4, 5]), verbosity=dict(type='int', choices=[0, 1, 2, 3, 4, 5]),
diff_mode=dict(type='bool', required=False), diff_mode=dict(type='bool'),
credential_passwords=dict(type='dict', required=False), credential_passwords=dict(type='dict'),
) )
# Create a module for ourselves # Create a module for ourselves
module = TowerModule(argument_spec=argument_spec, supports_check_mode=True) module = TowerModule(argument_spec=argument_spec)
optional_args = {} optional_args = {}
# Extract our parameters # Extract our parameters

View File

@@ -44,7 +44,6 @@ options:
tower_oauthtoken: tower_oauthtoken:
description: description:
- The Tower OAuth token to use. - The Tower OAuth token to use.
required: False
type: str type: str
version_added: "3.7" version_added: "3.7"
extends_documentation_fragment: awx.awx.auth extends_documentation_fragment: awx.awx.auth

View File

@@ -39,7 +39,6 @@ options:
job_type: job_type:
description: description:
- The job type to use for the job template. - The job type to use for the job template.
required: False
choices: ["run", "check"] choices: ["run", "check"]
type: str type: str
inventory: inventory:
@@ -332,12 +331,12 @@ def main():
playbook=dict(), playbook=dict(),
credential=dict(default=''), credential=dict(default=''),
vault_credential=dict(default=''), vault_credential=dict(default=''),
custom_virtualenv=dict(required=False), custom_virtualenv=dict(),
credentials=dict(type='list', default=[], elements='str'), credentials=dict(type='list', default=[], elements='str'),
forks=dict(type='int'), forks=dict(type='int'),
limit=dict(default=''), limit=dict(default=''),
verbosity=dict(type='int', choices=[0, 1, 2, 3, 4], default=0), verbosity=dict(type='int', choices=[0, 1, 2, 3, 4], default=0),
extra_vars=dict(type='dict', required=False), extra_vars=dict(type='dict'),
job_tags=dict(default=''), job_tags=dict(default=''),
force_handlers=dict(type='bool', default=False, aliases=['force_handlers_enabled']), force_handlers=dict(type='bool', default=False, aliases=['force_handlers_enabled']),
skip_tags=dict(default=''), skip_tags=dict(default=''),
@@ -369,7 +368,7 @@ def main():
) )
# Create a module for ourselves # Create a module for ourselves
module = TowerModule(argument_spec=argument_spec, supports_check_mode=True) module = TowerModule(argument_spec=argument_spec)
# Extract our parameters # Extract our parameters
name = module.params.get('name') name = module.params.get('name')

View File

@@ -127,7 +127,7 @@ def main():
) )
# Create a module for ourselves # Create a module for ourselves
module = TowerModule(argument_spec=argument_spec, supports_check_mode=True) module = TowerModule(argument_spec=argument_spec)
# Extract our parameters # Extract our parameters
job_id = module.params.get('job_id') job_id = module.params.get('job_id')

View File

@@ -48,7 +48,6 @@ options:
tower_oauthtoken: tower_oauthtoken:
description: description:
- The Tower OAuth token to use. - The Tower OAuth token to use.
required: False
type: str type: str
version_added: "3.7" version_added: "3.7"
extends_documentation_fragment: awx.awx.auth extends_documentation_fragment: awx.awx.auth
@@ -67,14 +66,14 @@ from ..module_utils.tower_api import TowerModule
def main(): def main():
# Any additional arguments that are not fields of the item can be added here # Any additional arguments that are not fields of the item can be added here
argument_spec = dict( argument_spec = dict(
name=dict(required=True, type='str'), name=dict(required=True),
new_name=dict(required=False, type='str'), new_name=dict(),
organization=dict(required=True, type='str'), organization=dict(required=True),
state=dict(choices=['present'], default='present'), state=dict(choices=['present'], default='present'),
) )
# Create a module for ourselves # Create a module for ourselves
module = TowerModule(argument_spec=argument_spec, supports_check_mode=True) module = TowerModule(argument_spec=argument_spec)
# Extract our parameters # Extract our parameters
name = module.params.get('name') name = module.params.get('name')

View File

@@ -37,7 +37,6 @@ options:
tower_oauthtoken: tower_oauthtoken:
description: description:
- The Tower OAuth token to use. - The Tower OAuth token to use.
required: False
type: str type: str
version_added: "3.7" version_added: "3.7"
extends_documentation_fragment: awx.awx.auth extends_documentation_fragment: awx.awx.auth

View File

@@ -390,7 +390,7 @@ def main():
) )
# Create a module for ourselves # Create a module for ourselves
module = TowerModule(argument_spec=argument_spec, supports_check_mode=True) module = TowerModule(argument_spec=argument_spec)
# Extract our parameters # Extract our parameters
name = module.params.get('name') name = module.params.get('name')

View File

@@ -37,14 +37,12 @@ options:
description: description:
- Local absolute file path containing a custom Python virtualenv to use. - Local absolute file path containing a custom Python virtualenv to use.
type: str type: str
required: False
default: '' default: ''
max_hosts: max_hosts:
description: description:
- The max hosts allowed in this organizations - The max hosts allowed in this organizations
default: "0" default: "0"
type: int type: int
required: False
version_added: "3.7" version_added: "3.7"
state: state:
description: description:
@@ -55,7 +53,6 @@ options:
tower_oauthtoken: tower_oauthtoken:
description: description:
- The Tower OAuth token to use. - The Tower OAuth token to use.
required: False
type: str type: str
version_added: "3.7" version_added: "3.7"
extends_documentation_fragment: awx.awx.auth extends_documentation_fragment: awx.awx.auth
@@ -85,15 +82,15 @@ from ..module_utils.tower_api import TowerModule
def main(): def main():
# Any additional arguments that are not fields of the item can be added here # Any additional arguments that are not fields of the item can be added here
argument_spec = dict( argument_spec = dict(
name=dict(type='str', required=True), name=dict(required=True),
description=dict(type='str', required=False), description=dict(),
custom_virtualenv=dict(type='str', required=False), custom_virtualenv=dict(),
max_hosts=dict(type='int', required=False, default="0"), max_hosts=dict(type='int', default="0"),
state=dict(type='str', choices=['present', 'absent'], default='present', required=False), state=dict(choices=['present', 'absent'], default='present'),
) )
# Create a module for ourselves # Create a module for ourselves
module = TowerModule(argument_spec=argument_spec, supports_check_mode=True) module = TowerModule(argument_spec=argument_spec)
# Extract our parameters # Extract our parameters
name = module.params.get('name') name = module.params.get('name')

View File

@@ -99,7 +99,6 @@ options:
description: description:
- Local absolute file path containing a custom Python virtualenv to use - Local absolute file path containing a custom Python virtualenv to use
type: str type: str
required: False
default: '' default: ''
organization: organization:
description: description:
@@ -123,7 +122,6 @@ options:
tower_oauthtoken: tower_oauthtoken:
description: description:
- The Tower OAuth token to use. - The Tower OAuth token to use.
required: False
type: str type: str
version_added: "3.7" version_added: "3.7"
extends_documentation_fragment: awx.awx.auth extends_documentation_fragment: awx.awx.auth
@@ -178,27 +176,27 @@ def main():
# Any additional arguments that are not fields of the item can be added here # Any additional arguments that are not fields of the item can be added here
argument_spec = dict( argument_spec = dict(
name=dict(required=True), name=dict(required=True),
description=dict(required=False), description=dict(),
scm_type=dict(required=False, choices=['manual', 'git', 'hg', 'svn', 'insights'], default='manual'), scm_type=dict(choices=['manual', 'git', 'hg', 'svn', 'insights'], default='manual'),
scm_url=dict(required=False), scm_url=dict(),
local_path=dict(required=False), local_path=dict(),
scm_branch=dict(required=False, default=''), scm_branch=dict(default=''),
scm_refspec=dict(required=False, default=''), scm_refspec=dict(default=''),
scm_credential=dict(required=False), scm_credential=dict(),
scm_clean=dict(required=False, type='bool', default=False), scm_clean=dict(type='bool', default=False),
scm_delete_on_update=dict(required=False, type='bool', default=False), scm_delete_on_update=dict(type='bool', default=False),
scm_update_on_launch=dict(required=False, type='bool', default=False), scm_update_on_launch=dict(type='bool', default=False),
scm_update_cache_timeout=dict(required=False, type='int', default=0), scm_update_cache_timeout=dict(type='int', default=0),
scm_allow_override=dict(required=False, type='bool'), scm_allow_override=dict(type='bool'),
job_timeout=dict(required=False, type='int', default=0), job_timeout=dict(type='int', default=0),
custom_virtualenv=dict(required=False, type='str'), custom_virtualenv=dict(),
organization=dict(required=True), organization=dict(required=True),
state=dict(required=False, choices=['present', 'absent'], default='present'), state=dict(choices=['present', 'absent'], default='present'),
wait=dict(required=False, type='bool', default=True), wait=dict(type='bool', default=True),
) )
# Create a module for ourselves # Create a module for ourselves
module = TowerModule(argument_spec=argument_spec, supports_check_mode=True) module = TowerModule(argument_spec=argument_spec)
# Extract our parameters # Extract our parameters
name = module.params.get('name') name = module.params.get('name')

View File

@@ -79,7 +79,6 @@ options:
tower_oauthtoken: tower_oauthtoken:
description: description:
- The Tower OAuth token to use. - The Tower OAuth token to use.
required: False
type: str type: str
version_added: "3.7" version_added: "3.7"
@@ -119,7 +118,7 @@ def main():
state=dict(choices=['present', 'absent'], default='present'), state=dict(choices=['present', 'absent'], default='present'),
) )
module = TowerModule(argument_spec=argument_spec, supports_check_mode=True) module = TowerModule(argument_spec=argument_spec)
role_type = module.params.pop('role') role_type = module.params.pop('role')
role_field = role_type + '_role' role_field = role_type + '_role'

View File

@@ -27,19 +27,16 @@ options:
description: description:
- The assets to import. - The assets to import.
- This can be the output of tower_receive or loaded from a file - This can be the output of tower_receive or loaded from a file
required: False
type: str type: str
files: files:
description: description:
- List of files to import. - List of files to import.
required: False
default: [] default: []
type: list type: list
elements: str elements: str
prevent: prevent:
description: description:
- A list of asset types to prevent import for - A list of asset types to prevent import for
required: false
default: [] default: []
type: list type: list
elements: str elements: str
@@ -47,7 +44,6 @@ options:
description: description:
- The password management option to use. - The password management option to use.
- The prompt option is not supported. - The prompt option is not supported.
required: false
default: 'default' default: 'default'
choices: ["default", "random"] choices: ["default", "random"]
type: str type: str
@@ -98,10 +94,10 @@ except ImportError:
def main(): def main():
argument_spec = dict( argument_spec = dict(
assets=dict(required=False), assets=dict(),
files=dict(required=False, default=[], type='list', elements='str'), files=dict(default=[], type='list', elements='str'),
prevent=dict(required=False, default=[], type='list', elements='str'), prevent=dict(default=[], type='list', elements='str'),
password_management=dict(required=False, default='default', choices=['default', 'random']), password_management=dict(default='default', choices=['default', 'random']),
) )
module = TowerModule(argument_spec=argument_spec, supports_check_mode=False) module = TowerModule(argument_spec=argument_spec, supports_check_mode=False)

View File

@@ -26,25 +26,21 @@ options:
name: name:
description: description:
- Name of setting to modify - Name of setting to modify
required: False
type: str type: str
value: value:
description: description:
- Value to be modified for given setting. - Value to be modified for given setting.
- If given a non-string type, will make best effort to cast it to type API expects. - If given a non-string type, will make best effort to cast it to type API expects.
- For better control over types, use the C(settings) param instead. - For better control over types, use the C(settings) param instead.
required: False
type: str type: str
settings: settings:
description: description:
- A data structure to be sent into the settings endpoint - A data structure to be sent into the settings endpoint
required: False
type: dict type: dict
version_added: "3.7" version_added: "3.7"
tower_oauthtoken: tower_oauthtoken:
description: description:
- The Tower OAuth token to use. - The Tower OAuth token to use.
required: False
type: str type: str
version_added: "3.7" version_added: "3.7"
requirements: requirements:
@@ -112,9 +108,9 @@ def coerce_type(module, value):
def main(): def main():
# Any additional arguments that are not fields of the item can be added here # Any additional arguments that are not fields of the item can be added here
argument_spec = dict( argument_spec = dict(
name=dict(required=False), name=dict(),
value=dict(required=False), value=dict(),
settings=dict(required=False, type='dict'), settings=dict(type='dict'),
) )
# Create a module for ourselves # Create a module for ourselves

View File

@@ -31,13 +31,11 @@ options:
new_name: new_name:
description: description:
- To use when changing a team's name. - To use when changing a team's name.
required: False
type: str type: str
version_added: "3.7" version_added: "3.7"
description: description:
description: description:
- The description to use for the team. - The description to use for the team.
required: False
type: str type: str
organization: organization:
description: description:
@@ -53,7 +51,6 @@ options:
tower_oauthtoken: tower_oauthtoken:
description: description:
- The Tower OAuth token to use. - The Tower OAuth token to use.
required: False
type: str type: str
version_added: "3.7" version_added: "3.7"
extends_documentation_fragment: awx.awx.auth extends_documentation_fragment: awx.awx.auth
@@ -77,14 +74,14 @@ def main():
# Any additional arguments that are not fields of the item can be added here # Any additional arguments that are not fields of the item can be added here
argument_spec = dict( argument_spec = dict(
name=dict(required=True), name=dict(required=True),
new_name=dict(required=False), new_name=dict(),
description=dict(required=False), description=dict(),
organization=dict(required=True), organization=dict(required=True),
state=dict(choices=['present', 'absent'], default='present'), state=dict(choices=['present', 'absent'], default='present'),
) )
# Create a module for ourselves # Create a module for ourselves
module = TowerModule(argument_spec=argument_spec, supports_check_mode=True) module = TowerModule(argument_spec=argument_spec)
# Extract our parameters # Extract our parameters
name = module.params.get('name') name = module.params.get('name')

View File

@@ -31,36 +31,30 @@ options:
first_name: first_name:
description: description:
- First name of the user. - First name of the user.
required: False
type: str type: str
last_name: last_name:
description: description:
- Last name of the user. - Last name of the user.
required: False
type: str type: str
email: email:
description: description:
- Email address of the user. - Email address of the user.
required: False
type: str type: str
is_superuser: is_superuser:
description: description:
- Designates that this user has all permissions without explicitly assigning them. - Designates that this user has all permissions without explicitly assigning them.
required: False
type: bool type: bool
default: False default: False
aliases: ['superuser'] aliases: ['superuser']
is_system_auditor: is_system_auditor:
description: description:
- User is a system wide auditor. - User is a system wide auditor.
required: False
type: bool type: bool
default: False default: False
aliases: ['auditor'] aliases: ['auditor']
password: password:
description: description:
- Write-only field used to change the password. - Write-only field used to change the password.
required: False
type: str type: str
state: state:
description: description:
@@ -71,7 +65,6 @@ options:
tower_oauthtoken: tower_oauthtoken:
description: description:
- The Tower OAuth token to use. - The Tower OAuth token to use.
required: False
type: str type: str
version_added: "3.7" version_added: "3.7"
extends_documentation_fragment: awx.awx.auth extends_documentation_fragment: awx.awx.auth
@@ -121,18 +114,18 @@ from ..module_utils.tower_api import TowerModule
def main(): def main():
# Any additional arguments that are not fields of the item can be added here # Any additional arguments that are not fields of the item can be added here
argument_spec = dict( argument_spec = dict(
username=dict(required=True, type='str'), username=dict(required=True),
first_name=dict(required=False, type='str'), first_name=dict(),
last_name=dict(required=False, type='str'), last_name=dict(),
email=dict(required=False, type='str'), email=dict(),
is_superuser=dict(required=False, type='bool', default=False, aliases=['superuser']), is_superuser=dict(type='bool', default=False, aliases=['superuser']),
is_system_auditor=dict(required=False, type='bool', default=False, aliases=['auditor']), is_system_auditor=dict(type='bool', default=False, aliases=['auditor']),
password=dict(required=False, type='str', no_log=True), password=dict(no_log=True),
state=dict(choices=['present', 'absent'], default='present'), state=dict(choices=['present', 'absent'], default='present'),
) )
# Create a module for ourselves # Create a module for ourselves
module = TowerModule(argument_spec=argument_spec, supports_check_mode=True) module = TowerModule(argument_spec=argument_spec)
# Extract our parameters # Extract our parameters
username = module.params.get('username') username = module.params.get('username')

View File

@@ -32,69 +32,56 @@ options:
new_name: new_name:
description: description:
- Setting this option will change the existing name. - Setting this option will change the existing name.
required: False
type: str type: str
description: description:
description: description:
- Optional description of this workflow job template. - Optional description of this workflow job template.
required: False
type: str type: str
extra_vars: extra_vars:
description: description:
- Variables which will be made available to jobs ran inside the workflow. - Variables which will be made available to jobs ran inside the workflow.
required: False
type: dict type: dict
organization: organization:
description: description:
- Organization the workflow job template exists in. - Organization the workflow job template exists in.
- Used to help lookup the object, cannot be modified using this module. - Used to help lookup the object, cannot be modified using this module.
- If not provided, will lookup by name only, which does not work with duplicates. - If not provided, will lookup by name only, which does not work with duplicates.
required: False
type: str type: str
allow_simultaneous: allow_simultaneous:
description: description:
- Allow simultaneous runs of the workflow job template. - Allow simultaneous runs of the workflow job template.
required: False
type: bool type: bool
ask_variables_on_launch: ask_variables_on_launch:
description: description:
- Prompt user for C(extra_vars) on launch. - Prompt user for C(extra_vars) on launch.
required: False
type: bool type: bool
inventory: inventory:
description: description:
- Inventory applied as a prompt, assuming job template prompts for inventory - Inventory applied as a prompt, assuming job template prompts for inventory
required: False
type: str type: str
limit: limit:
description: description:
- Limit applied as a prompt, assuming job template prompts for limit - Limit applied as a prompt, assuming job template prompts for limit
required: False
type: str type: str
scm_branch: scm_branch:
description: description:
- SCM branch applied as a prompt, assuming job template prompts for SCM branch - SCM branch applied as a prompt, assuming job template prompts for SCM branch
required: False
type: str type: str
ask_inventory_on_launch: ask_inventory_on_launch:
description: description:
- Prompt user for inventory on launch of this workflow job template - Prompt user for inventory on launch of this workflow job template
required: False
type: bool type: bool
ask_scm_branch_on_launch: ask_scm_branch_on_launch:
description: description:
- Prompt user for SCM branch on launch of this workflow job template - Prompt user for SCM branch on launch of this workflow job template
required: False
type: bool type: bool
ask_limit_on_launch: ask_limit_on_launch:
description: description:
- Prompt user for limit on launch of this workflow job template - Prompt user for limit on launch of this workflow job template
required: False
type: bool type: bool
webhook_service: webhook_service:
description: description:
- Service that webhook requests will be accepted from - Service that webhook requests will be accepted from
required: False
type: str type: str
choices: choices:
- github - github
@@ -102,7 +89,6 @@ options:
webhook_credential: webhook_credential:
description: description:
- Personal Access Token for posting back the status to the service API - Personal Access Token for posting back the status to the service API
required: False
type: str type: str
survey_enabled: survey_enabled:
description: description:
@@ -113,7 +99,6 @@ options:
description: description:
- The definition of the survey associated to the workflow. - The definition of the survey associated to the workflow.
type: dict type: dict
required: false
state: state:
description: description:
- Desired state of the resource. - Desired state of the resource.
@@ -125,7 +110,6 @@ options:
tower_oauthtoken: tower_oauthtoken:
description: description:
- The Tower OAuth token to use. - The Tower OAuth token to use.
required: False
type: str type: str
version_added: "3.7" version_added: "3.7"
extends_documentation_fragment: awx.awx.auth extends_documentation_fragment: awx.awx.auth
@@ -153,28 +137,28 @@ def update_survey(module, last_request):
def main(): def main():
# Any additional arguments that are not fields of the item can be added here # Any additional arguments that are not fields of the item can be added here
argument_spec = dict( argument_spec = dict(
name=dict(required=True, type='str'), name=dict(required=True),
new_name=dict(type='str'), new_name=dict(),
description=dict(type='str'), description=dict(),
extra_vars=dict(type='dict'), extra_vars=dict(type='dict'),
organization=dict(type='str'), organization=dict(),
survey=dict(type='dict'), # special handling survey=dict(type='dict'), # special handling
survey_enabled=dict(type='bool'), survey_enabled=dict(type='bool'),
allow_simultaneous=dict(type='bool'), allow_simultaneous=dict(type='bool'),
ask_variables_on_launch=dict(type='bool'), ask_variables_on_launch=dict(type='bool'),
inventory=dict(type='str'), inventory=dict(),
limit=dict(type='str'), limit=dict(),
scm_branch=dict(type='str'), scm_branch=dict(),
ask_inventory_on_launch=dict(type='bool'), ask_inventory_on_launch=dict(type='bool'),
ask_scm_branch_on_launch=dict(type='bool'), ask_scm_branch_on_launch=dict(type='bool'),
ask_limit_on_launch=dict(type='bool'), ask_limit_on_launch=dict(type='bool'),
webhook_service=dict(type='str', choices=['github', 'gitlab']), webhook_service=dict(choices=['github', 'gitlab']),
webhook_credential=dict(type='str'), webhook_credential=dict(),
state=dict(choices=['present', 'absent'], default='present'), state=dict(choices=['present', 'absent'], default='present'),
) )
# Create a module for ourselves # Create a module for ourselves
module = TowerModule(argument_spec=argument_spec, supports_check_mode=True) module = TowerModule(argument_spec=argument_spec)
# Extract our parameters # Extract our parameters
name = module.params.get('name') name = module.params.get('name')

View File

@@ -31,23 +31,19 @@ options:
description: description:
- Variables to apply at launch time. - Variables to apply at launch time.
- Will only be accepted if job template prompts for vars or has a survey asking for those vars. - Will only be accepted if job template prompts for vars or has a survey asking for those vars.
required: False
type: dict type: dict
default: {} default: {}
inventory: inventory:
description: description:
- Inventory applied as a prompt, if job template prompts for inventory - Inventory applied as a prompt, if job template prompts for inventory
required: False
type: str type: str
scm_branch: scm_branch:
description: description:
- SCM branch applied as a prompt, if job template prompts for SCM branch - SCM branch applied as a prompt, if job template prompts for SCM branch
required: False
type: str type: str
job_type: job_type:
description: description:
- Job type applied as a prompt, if job template prompts for job type - Job type applied as a prompt, if job template prompts for job type
required: False
type: str type: str
choices: choices:
- 'run' - 'run'
@@ -55,27 +51,22 @@ options:
job_tags: job_tags:
description: description:
- Job tags applied as a prompt, if job template prompts for job tags - Job tags applied as a prompt, if job template prompts for job tags
required: False
type: str type: str
skip_tags: skip_tags:
description: description:
- Tags to skip, applied as a prompt, if job tempalte prompts for job tags - Tags to skip, applied as a prompt, if job tempalte prompts for job tags
required: False
type: str type: str
limit: limit:
description: description:
- Limit to act on, applied as a prompt, if job template prompts for limit - Limit to act on, applied as a prompt, if job template prompts for limit
required: False
type: str type: str
diff_mode: diff_mode:
description: description:
- Run diff mode, applied as a prompt, if job template prompts for diff mode - Run diff mode, applied as a prompt, if job template prompts for diff mode
required: False
type: bool type: bool
verbosity: verbosity:
description: description:
- Verbosity applied as a prompt, if job template prompts for verbosity - Verbosity applied as a prompt, if job template prompts for verbosity
required: False
type: str type: str
choices: choices:
- '0' - '0'
@@ -96,19 +87,16 @@ options:
description: description:
- The organization of the workflow job template the node exists in. - The organization of the workflow job template the node exists in.
- Used for looking up the workflow, not a direct model field. - Used for looking up the workflow, not a direct model field.
required: False
type: str type: str
unified_job_template: unified_job_template:
description: description:
- Name of unified job template to run in the workflow. - Name of unified job template to run in the workflow.
- Can be a job template, project, inventory source, etc. - Can be a job template, project, inventory source, etc.
- Omit if creating an approval node (not yet implemented). - Omit if creating an approval node (not yet implemented).
required: False
type: str type: str
all_parents_must_converge: all_parents_must_converge:
description: description:
- If enabled then the node will only run if all of the parent nodes have met the criteria to reach this node - If enabled then the node will only run if all of the parent nodes have met the criteria to reach this node
required: False
type: bool type: bool
identifier: identifier:
description: description:
@@ -120,21 +108,18 @@ options:
description: description:
- Nodes that will run after this node completes. - Nodes that will run after this node completes.
- List of node identifiers. - List of node identifiers.
required: False
type: list type: list
elements: str elements: str
success_nodes: success_nodes:
description: description:
- Nodes that will run after this node on success. - Nodes that will run after this node on success.
- List of node identifiers. - List of node identifiers.
required: False
type: list type: list
elements: str elements: str
failure_nodes: failure_nodes:
description: description:
- Nodes that will run after this node on failure. - Nodes that will run after this node on failure.
- List of node identifiers. - List of node identifiers.
required: False
type: list type: list
elements: str elements: str
credentials: credentials:
@@ -142,7 +127,6 @@ options:
- Credentials to be applied to job as launch-time prompts. - Credentials to be applied to job as launch-time prompts.
- List of credential names. - List of credential names.
- Uniqueness is not handled rigorously. - Uniqueness is not handled rigorously.
required: False
type: list type: list
elements: str elements: str
state: state:
@@ -154,7 +138,6 @@ options:
tower_oauthtoken: tower_oauthtoken:
description: description:
- The Tower OAuth token to use. - The Tower OAuth token to use.
required: False
type: str type: str
version_added: "3.7" version_added: "3.7"
extends_documentation_fragment: awx.awx.auth extends_documentation_fragment: awx.awx.auth
@@ -186,19 +169,19 @@ from ..module_utils.tower_api import TowerModule
def main(): def main():
# Any additional arguments that are not fields of the item can be added here # Any additional arguments that are not fields of the item can be added here
argument_spec = dict( argument_spec = dict(
identifier=dict(required=True, type='str'), identifier=dict(required=True),
workflow_job_template=dict(required=True, type='str', aliases=['workflow']), workflow_job_template=dict(required=True, aliases=['workflow']),
organization=dict(type='str'), organization=dict(),
extra_data=dict(type='dict'), extra_data=dict(type='dict'),
inventory=dict(type='str'), inventory=dict(),
scm_branch=dict(type='str'), scm_branch=dict(),
job_type=dict(type='str', choices=['run', 'check']), job_type=dict(choices=['run', 'check']),
job_tags=dict(type='str'), job_tags=dict(),
skip_tags=dict(type='str'), skip_tags=dict(),
limit=dict(type='str'), limit=dict(),
diff_mode=dict(type='bool'), diff_mode=dict(type='bool'),
verbosity=dict(type='str', choices=['0', '1', '2', '3', '4', '5']), verbosity=dict(choices=['0', '1', '2', '3', '4', '5']),
unified_job_template=dict(type='str'), unified_job_template=dict(),
all_parents_must_converge=dict(type='bool'), all_parents_must_converge=dict(type='bool'),
success_nodes=dict(type='list', elements='str'), success_nodes=dict(type='list', elements='str'),
always_nodes=dict(type='list', elements='str'), always_nodes=dict(type='list', elements='str'),
@@ -208,7 +191,7 @@ def main():
) )
# Create a module for ourselves # Create a module for ourselves
module = TowerModule(argument_spec=argument_spec, supports_check_mode=True) module = TowerModule(argument_spec=argument_spec)
# Extract our parameters # Extract our parameters
identifier = module.params.get('identifier') identifier = module.params.get('identifier')

View File

@@ -28,12 +28,10 @@ options:
extra_vars: extra_vars:
description: description:
- Any extra vars required to launch the job. - Any extra vars required to launch the job.
required: False
type: str type: str
wait: wait:
description: description:
- Wait for the workflow to complete. - Wait for the workflow to complete.
required: False
default: True default: True
type: bool type: bool
timeout: timeout:
@@ -94,9 +92,9 @@ except ImportError:
def main(): def main():
argument_spec = dict( argument_spec = dict(
workflow_template=dict(required=True), workflow_template=dict(required=True),
extra_vars=dict(required=False), extra_vars=dict(),
wait=dict(required=False, default=True, type='bool'), wait=dict(default=True, type='bool'),
timeout=dict(required=False, default=None, type='int'), timeout=dict(default=None, type='int'),
) )
module = TowerModule( module = TowerModule(

View File

@@ -78,7 +78,6 @@ options:
description: description:
- The definition of the survey associated to the workflow. - The definition of the survey associated to the workflow.
type: dict type: dict
required: false
state: state:
description: description:
- Desired state of the resource. - Desired state of the resource.
@@ -128,16 +127,16 @@ except ImportError:
def main(): def main():
argument_spec = dict( argument_spec = dict(
name=dict(required=True), name=dict(required=True),
description=dict(required=False), description=dict(),
extra_vars=dict(type='dict', required=False), extra_vars=dict(type='dict'),
organization=dict(required=False), organization=dict(),
allow_simultaneous=dict(type='bool', required=False), allow_simultaneous=dict(type='bool'),
schema=dict(type='list', elements='dict', required=False), schema=dict(type='list', elements='dict'),
survey=dict(type='dict'), survey=dict(type='dict'),
survey_enabled=dict(type='bool', required=False), survey_enabled=dict(type='bool'),
inventory=dict(required=False), inventory=dict(),
ask_inventory=dict(type='bool', required=False), ask_inventory=dict(type='bool'),
ask_extra_vars=dict(type='bool', required=False), ask_extra_vars=dict(type='bool'),
state=dict(choices=['present', 'absent'], default='present'), state=dict(choices=['present', 'absent'], default='present'),
) )