任务作业

创建Ansible任务

创建Ansible任务(1=手动,2=Git导入)。K8s部署任务请使用专门的K8s创建接口

post/api/v1/task/ansible

Request

  • The document declares no server URL.
  • Auth
    API key in header Authorization

Request body multipart/form-data

namestring required

任务名称

typeinteger required

任务类型(1=手动,2=Git导入)

hostGroupsstring required

主机分组JSON

gitRepostring

Git仓库地址(type=2时必填)

variablesstring

全局变量JSON

playbooksstring binary

playbook文件(type=1时上传)

rolesstring binary

roles目录(type=1时上传)

Response

OK

codeinteger

状态码

messagestring

提示信息

Changes

No recorded changes to this operation across all 1 revision of this API.