mirror of
https://github.com/ansible/awx.git
synced 2026-02-21 21:20:08 -03:30
Merge branch 'devel' into collection-existential-state-for-credential-module
This commit is contained in:
@@ -186,6 +186,9 @@ EXAMPLES = '''
|
||||
food: carrot
|
||||
color: orange
|
||||
limit: bar
|
||||
credentials:
|
||||
- "My Credential"
|
||||
- "suplementary cred"
|
||||
extra_vars: # these override / extend extra_data at the job level
|
||||
food: grape
|
||||
animal: owl
|
||||
|
||||
@@ -159,7 +159,7 @@ def main():
|
||||
# Here we are going to setup a dict of values to export
|
||||
export_args = {}
|
||||
for resource in EXPORTABLE_RESOURCES:
|
||||
if module.params.get('all') or module.params.get(resource) == 'all':
|
||||
if module.params.get('all') or module.params.get(resource) == ['all']:
|
||||
# If we are exporting everything or we got the keyword "all" we pass in an empty string for this asset type
|
||||
export_args[resource] = ''
|
||||
else:
|
||||
|
||||
@@ -151,7 +151,9 @@ EXAMPLES = '''
|
||||
job_launch:
|
||||
job_template: "My Job Template"
|
||||
inventory: "My Inventory"
|
||||
credential: "My Credential"
|
||||
credentials:
|
||||
- "My Credential"
|
||||
- "suplementary cred"
|
||||
register: job
|
||||
- name: Wait for job max 120s
|
||||
job_wait:
|
||||
|
||||
@@ -337,6 +337,7 @@ EXAMPLES = '''
|
||||
playbook: "ping.yml"
|
||||
credentials:
|
||||
- "Local"
|
||||
- "2nd credential"
|
||||
state: "present"
|
||||
controller_config_file: "~/tower_cli.cfg"
|
||||
survey_enabled: yes
|
||||
|
||||
@@ -461,7 +461,9 @@ EXAMPLES = '''
|
||||
failure_nodes:
|
||||
- identifier: node201
|
||||
always_nodes: []
|
||||
credentials: []
|
||||
credentials:
|
||||
- local_cred
|
||||
- suplementary cred
|
||||
- identifier: node201
|
||||
unified_job_template:
|
||||
organization:
|
||||
|
||||
@@ -91,7 +91,6 @@ EXAMPLES = '''
|
||||
'''
|
||||
|
||||
from ..module_utils.controller_api import ControllerAPIModule
|
||||
import json
|
||||
|
||||
|
||||
def main():
|
||||
@@ -116,15 +115,18 @@ def main():
|
||||
name = module.params.get('name')
|
||||
organization = module.params.get('organization')
|
||||
inventory = module.params.get('inventory')
|
||||
optional_args['limit'] = module.params.get('limit')
|
||||
wait = module.params.get('wait')
|
||||
interval = module.params.get('interval')
|
||||
timeout = module.params.get('timeout')
|
||||
|
||||
# Special treatment of extra_vars parameter
|
||||
extra_vars = module.params.get('extra_vars')
|
||||
if extra_vars is not None:
|
||||
optional_args['extra_vars'] = json.dumps(extra_vars)
|
||||
for field_name in (
|
||||
'limit',
|
||||
'extra_vars',
|
||||
'scm_branch',
|
||||
):
|
||||
field_val = module.params.get(field_name)
|
||||
if field_val is not None:
|
||||
optional_args[field_name] = field_val
|
||||
|
||||
# Create a datastructure to pass into our job launch
|
||||
post_data = {}
|
||||
|
||||
Reference in New Issue
Block a user