GET /api/hostgroups
列出所有主机组

GET /api/puppetclasses/:puppetclass_id/hostgroups
列出 Puppet 类别的所有主机组

GET /api/locations/:location_id/hostgroups
列出每个位置的所有主机组

GET /api/organizations/:organization_id/hostgroups
列出每个机构的所有主机组

参数

参数名字 描述
puppetclass_id
选填

Puppet 类别 ID

Validations:

  • Must be a String

location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

search
选填

过滤结果

Validations:

  • Must be a String

order
选填

sort results

Validations:

  • Must be a String

page
选填

编页结果

Validations:

  • Must be a String

per_page
选填

每个请求中的条目数

Validations:

  • Must be a String

include
选填

要包含的额外信息类型阵列

Validations:

  • Must be an array of [“parameters”]

搜索字段

字段名 类型 可能的值
architecture string
class string
config_group string
environment string
host string
id integer
label string
location string
location_id integer
medium string
name string
organization string
organization_id integer
os string
os_description string
os_id integer
os_major string
os_minor string
os_title string
params text
template string
title string

GET /api/hostgroups/:id
显示主机组

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

show_hidden_parameters
选填

显示隐藏的参数值

Validations:

  • Must be one of: true, false, 1, 0


POST /api/hostgroups
创建主机组

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

hostgroup
必填

Validations:

  • Must be a Hash

hostgroup[name]
必填

主机组名称

Validations:

  • Must be a String

hostgroup[description]
选填 , 允许空值

主机组描述

Validations:

  • Must be a String

hostgroup[parent_id]
选填 , 允许空值

主机组父 ID

Validations:

  • Must be a number.

hostgroup[environment_id]
选填 , 允许空值

环境 ID

Validations:

  • Must be a number.

hostgroup[compute_profile_id]
选填 , 允许空值

计算配置文件 ID

Validations:

  • Must be a number.

hostgroup[compute_resource_id]
选填 , 允许空值

计算资源 ID

Validations:

  • Must be a number.

hostgroup[operatingsystem_id]
选填 , 允许空值

操作系统 ID

Validations:

  • Must be a number.

hostgroup[architecture_id]
选填 , 允许空值

架构 ID

Validations:

  • Must be a number.

hostgroup[pxe_loader]
选填 , 允许空值

DHCP 文件名选项(默认为 Grub2/PXELinux)

Validations:

  • Must be one of: None, PXELinux BIOS, PXELinux UEFI, Grub UEFI, Grub2 UEFI, Grub2 UEFI SecureBoot.

hostgroup[medium_id]
选填 , 允许空值

介质 ID

Validations:

  • Must be a number.

hostgroup[ptable_id]
选填 , 允许空值

分区表 ID

Validations:

  • Must be a number.

hostgroup[subnet_id]
选填 , 允许空值

子网 ID

Validations:

  • Must be a number.

hostgroup[domain_id]
选填 , 允许空值

域 ID

Validations:

  • Must be a number.

hostgroup[realm_id]
选填 , 允许空值

范围 ID

Validations:

  • Must be a number.

hostgroup[config_group_ids]
选填 , 允许空值

关联配置组的 ID

Validations:

  • Must be an array of any type

hostgroup[group_parameters_attributes]
选填 , 允许空值

参数阵列

Validations:

  • Must be an Array of nested elements

hostgroup[group_parameters_attributes][name]
必填

参数名称

Validations:

  • Must be a String

hostgroup[group_parameters_attributes][value]
必填

参数值

Validations:

  • Must be a String

hostgroup[puppet_proxy_id]
选填 , 允许空值

Puppet 代理服务器 ID

Validations:

  • Must be a number.

hostgroup[puppet_ca_proxy_id]
选填 , 允许空值

Puppet CA 代理服务器 ID

Validations:

  • Must be a number.

hostgroup[root_pass]
选填 , 允许空值

预配主机中的 root 密码

Validations:

  • Must be a String

hostgroup[location_ids]
选填 , 允许空值

使用给定 id 替换位置

Validations:

  • Must be an array of any type

hostgroup[organization_ids]
选填 , 允许空值

使用给定 id 替换机构

Validations:

  • Must be an array of any type

hostgroup[ansible_role_ids]
选填

IDs of associated ansible roles

Validations:

  • Must be an array of any type


PUT /api/hostgroups/:id
更新主机组

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

hostgroup
必填

Validations:

  • Must be a Hash

hostgroup[name]
选填

主机组名称

Validations:

  • Must be a String

hostgroup[description]
选填 , 允许空值

主机组描述

Validations:

  • Must be a String

hostgroup[parent_id]
选填 , 允许空值

主机组父 ID

Validations:

  • Must be a number.

hostgroup[environment_id]
选填 , 允许空值

环境 ID

Validations:

  • Must be a number.

hostgroup[compute_profile_id]
选填 , 允许空值

计算配置文件 ID

Validations:

  • Must be a number.

hostgroup[compute_resource_id]
选填 , 允许空值

计算资源 ID

Validations:

  • Must be a number.

hostgroup[operatingsystem_id]
选填 , 允许空值

操作系统 ID

Validations:

  • Must be a number.

hostgroup[architecture_id]
选填 , 允许空值

架构 ID

Validations:

  • Must be a number.

hostgroup[pxe_loader]
选填 , 允许空值

DHCP 文件名选项(默认为 Grub2/PXELinux)

Validations:

  • Must be one of: None, PXELinux BIOS, PXELinux UEFI, Grub UEFI, Grub2 UEFI, Grub2 UEFI SecureBoot.

hostgroup[medium_id]
选填 , 允许空值

介质 ID

Validations:

  • Must be a number.

hostgroup[ptable_id]
选填 , 允许空值

分区表 ID

Validations:

  • Must be a number.

hostgroup[subnet_id]
选填 , 允许空值

子网 ID

Validations:

  • Must be a number.

hostgroup[domain_id]
选填 , 允许空值

域 ID

Validations:

  • Must be a number.

hostgroup[realm_id]
选填 , 允许空值

范围 ID

Validations:

  • Must be a number.

hostgroup[config_group_ids]
选填 , 允许空值

关联配置组的 ID

Validations:

  • Must be an array of any type

hostgroup[group_parameters_attributes]
选填 , 允许空值

参数阵列

Validations:

  • Must be an Array of nested elements

hostgroup[group_parameters_attributes][name]
选填

参数名称

Validations:

  • Must be a String

hostgroup[group_parameters_attributes][value]
选填

参数值

Validations:

  • Must be a String

hostgroup[puppet_proxy_id]
选填 , 允许空值

Puppet 代理服务器 ID

Validations:

  • Must be a number.

hostgroup[puppet_ca_proxy_id]
选填 , 允许空值

Puppet CA 代理服务器 ID

Validations:

  • Must be a number.

hostgroup[root_pass]
选填 , 允许空值

预配主机中的 root 密码

Validations:

  • Must be a String

hostgroup[location_ids]
选填 , 允许空值

使用给定 id 替换位置

Validations:

  • Must be an array of any type

hostgroup[organization_ids]
选填 , 允许空值

使用给定 id 替换机构

Validations:

  • Must be an array of any type

hostgroup[ansible_role_ids]
选填

IDs of associated ansible roles

Validations:

  • Must be an array of any type


DELETE /api/hostgroups/:id
删除主机组

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


POST /api/hostgroups/:id/clone
克隆主机组

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

name
必填

Validations:

  • Must be a String


PUT /api/hostgroups/:id/rebuild_config
重建业务流程配置

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

only
选填

限制重建步骤,有效步骤是 DHCP, DNS, TFTP

Validations:

  • Must be an array of any type

children_hosts
选填

在子主机组中操作

Validations:

  • Must be one of: true, false, 1, 0


POST /api/hostgroups/:id/play_roles
Plays Ansible roles on a hostgroup

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be a String


POST /api/hostgroups/play_roles
Plays Ansible roles on hostgroups

参数

参数名字 描述
location_id
选填

根据位置界定的范围

Validations:

  • Must be a Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be a Integer

id
必填

Validations:

  • Must be an array of any type