I got the reason. Should use "https" instead of "http".
在 2017年11月8日星期三 UTC+11下午5:10:29,[email protected]写道: > > I tried to launch a Job from a Job template by calling Ansible Tower API. > Took a test on PostMan, turns out the > http://ansibletowerhost/api/v2/job_templates/8/launch/ with POST cannot > work correctly. > > Here 8 is the job template id, which is a simple test job template. The > document says the result should be like below, and there will be a job > record created on Tower. > > { > "ignored_fields": { > "credential": 2, > "job_tags": "setup,teardown" > } > "id": 4, > ...more data about the job... > "job": 4,} > > But what I got is like this, > > { > "can_start_without_user_input": true, > "passwords_needed_to_start": [], > "ask_variables_on_launch": false, > "ask_tags_on_launch": false, > "ask_diff_mode_on_launch": false, > "ask_skip_tags_on_launch": false, > "ask_job_type_on_launch": false, > "ask_limit_on_launch": false, > "ask_verbosity_on_launch": false, > "ask_inventory_on_launch": false, > "ask_credential_on_launch": false, > "survey_enabled": false, > "variables_needed_to_start": [], > "credential_needed_to_start": false, > "inventory_needed_to_start": false, > "job_template_data": { > "id": 8, > "description": "", > "name": "simpletest" > }, > "defaults": { > "extra_credentials": [], > "credential": { > "id": 1, > "name": "Demo Credential" > }, > "job_tags": "", > "extra_vars": "", > "verbosity": 0, > "job_type": "run", > "diff_mode": false, > "skip_tags": "", > "limit": "", > "inventory": { > "id": 1, > "name": "Demo Inventory" > }, > "vault_credential": { > "id": null, > "name": null > } > } > } > > Any idea what goes wrong here? > > Thanks. > -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
