mirror of
https://github.com/ansible/awx.git
synced 2026-05-16 13:57:39 -02:30
update
This commit is contained in:
@@ -83,6 +83,10 @@ options:
|
||||
- Name of the vault credential to use for the job template.
|
||||
- Deprecated, use 'credentials'.
|
||||
type: str
|
||||
execution_environment:
|
||||
description:
|
||||
- Execution Environment to use for the JT.
|
||||
type: str
|
||||
forks:
|
||||
description:
|
||||
- The number of parallel or simultaneous processes to use while executing the playbook.
|
||||
@@ -231,10 +235,6 @@ options:
|
||||
description:
|
||||
- Maximum time in seconds to wait for a job to finish (server-side).
|
||||
type: int
|
||||
custom_virtualenv:
|
||||
description:
|
||||
- Local absolute file path containing a custom Python virtualenv to use.
|
||||
type: str
|
||||
job_slice_count:
|
||||
description:
|
||||
- The number of jobs to slice into at runtime. Will cause the Job Template to launch a workflow if value is greater than 1.
|
||||
@@ -308,7 +308,6 @@ EXAMPLES = '''
|
||||
tower_config_file: "~/tower_cli.cfg"
|
||||
survey_enabled: yes
|
||||
survey_spec: "{{ lookup('file', 'my_survey.json') }}"
|
||||
custom_virtualenv: "/var/lib/awx/venv/custom-venv/"
|
||||
|
||||
- name: Add start notification to Job Template
|
||||
tower_job_template:
|
||||
@@ -366,8 +365,8 @@ def main():
|
||||
playbook=dict(),
|
||||
credential=dict(),
|
||||
vault_credential=dict(),
|
||||
custom_virtualenv=dict(),
|
||||
credentials=dict(type='list', elements='str'),
|
||||
execution_environment=dict(),
|
||||
forks=dict(type='int'),
|
||||
limit=dict(),
|
||||
verbosity=dict(type='int', choices=[0, 1, 2, 3, 4], default=0),
|
||||
@@ -437,6 +436,10 @@ def main():
|
||||
organization_id = module.resolve_name_to_id('organizations', organization)
|
||||
search_fields['organization'] = new_fields['organization'] = organization_id
|
||||
|
||||
ee = module.params.get('execution_environment')
|
||||
if ee:
|
||||
new_fields['execution_environment'] = module.resolve_name_to_id('execution_environments', ee)
|
||||
|
||||
# Attempt to look up an existing item based on the provided data
|
||||
existing_item = module.get_one('job_templates', name_or_id=name, **{'data': search_fields})
|
||||
|
||||
@@ -460,7 +463,7 @@ def main():
|
||||
'host_config_key', 'ask_scm_branch_on_launch', 'ask_diff_mode_on_launch', 'ask_variables_on_launch',
|
||||
'ask_limit_on_launch', 'ask_tags_on_launch', 'ask_skip_tags_on_launch', 'ask_job_type_on_launch',
|
||||
'ask_verbosity_on_launch', 'ask_inventory_on_launch', 'ask_credential_on_launch', 'survey_enabled',
|
||||
'become_enabled', 'diff_mode', 'allow_simultaneous', 'custom_virtualenv', 'job_slice_count', 'webhook_service',
|
||||
'become_enabled', 'diff_mode', 'allow_simultaneous', 'job_slice_count', 'webhook_service',
|
||||
):
|
||||
field_val = module.params.get(field_name)
|
||||
if field_val is not None:
|
||||
|
||||
Reference in New Issue
Block a user