【问题标题】:Job Template in Ansible Tower using API EndpointAnsible Tower 中使用 API 端点的作业模板
【发布时间】:2020-05-30 03:19:06
【问题描述】:

如何使用 nodejs 脚本中的 Api Endpoint 在 ansible Tower 中创建作业模板。

【问题讨论】:

  • 您好,欢迎来到 SO。你尝试了什么,你到底面临什么问题?
  • @Zeitounator 谢谢...实际上我不知道如何创建 nodejs 以在 ansible Tower 中创建作业模板。

标签: node.js ansible ansible-tower


【解决方案1】:

恐怕我对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。应该可以的。

祝你好运!

【讨论】:

    猜你喜欢
    • 2018-02-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多