恐怕我对node.js不熟悉。但就 Ansible 部分而言,将浏览器导航到 https://my-ansible-tower/api/v2/job_templates。在页面底部,您将看到可以设置的选项:
{
"name": "",
"description": "",
"job_type": "run",
"inventory": null,
"project": null,
"playbook": "",
"forks": 0,
"limit": "",
"verbosity": 0,
"extra_vars": "",
"job_tags": "",
"force_handlers": false,
"skip_tags": "",
"start_at_task": "",
"timeout": 0,
"use_fact_cache": false,
"host_config_key": "",
"ask_diff_mode_on_launch": false,
"ask_variables_on_launch": false,
"ask_limit_on_launch": false,
"ask_tags_on_launch": false,
"ask_skip_tags_on_launch": false,
"ask_job_type_on_launch": false,
"ask_verbosity_on_launch": false,
"ask_inventory_on_launch": false,
"ask_credential_on_launch": false,
"survey_enabled": false,
"become_enabled": false,
"diff_mode": false,
"allow_simultaneous": false,
"custom_virtualenv": null,
"job_slice_count": 1,
"credential": null,
"vault_credential": null
}
在您的 node.js 脚本中设置它们并推送到该 URL。应该可以的。
祝你好运!