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 String

location_id
选填

根据位置界定的范围

Validations:

  • Must be Integer

organization_id
选填

根据机构界定的范围

Validations:

  • Must be Integer

search
选填

过滤结果

Validations:

  • Must be String

order
选填

结果排序

Validations:

  • Must be String

page
选填

编页结果

Validations:

  • Must be String

per_page
选填

每个请求中的条目数

Validations:

  • Must be String


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

参数

参数名字 描述
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
选填

Display hidden parameter values

Validations:

  • Must be 'true' or 'false' or '1' or '0'


POST /api/hostgroups
创建主机组

参数

参数名字 描述
hostgroup
必填

Validations:

  • Must be a Hash

hostgroup[name]
必填

主机组名称

Validations:

  • Must be 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[operatingsystem_id]
选填 , 允许空值

操作系统 ID

Validations:

  • Must be a number.

hostgroup[architecture_id]
选填 , 允许空值

架构 ID

Validations:

  • Must be a number.

hostgroup[pxe_loader]
选填 , 允许空值

DHCP filename option (Grub2/PXELinux by default)

Validations:

  • Must be one of: None, PXELinux BIOS, PXELinux UEFI, Grub UEFI, Grub UEFI SecureBoot, 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]
选填 , 允许空值

IDs of associated config groups

Validations:

  • Must be an array of any type

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 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


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

参数

参数名字 描述
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 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[operatingsystem_id]
选填 , 允许空值

操作系统 ID

Validations:

  • Must be a number.

hostgroup[architecture_id]
选填 , 允许空值

架构 ID

Validations:

  • Must be a number.

hostgroup[pxe_loader]
选填 , 允许空值

DHCP filename option (Grub2/PXELinux by default)

Validations:

  • Must be one of: None, PXELinux BIOS, PXELinux UEFI, Grub UEFI, Grub UEFI SecureBoot, 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]
选填 , 允许空值

IDs of associated config groups

Validations:

  • Must be an array of any type

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 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


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

参数

参数名字 描述
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
克隆主机组

参数

参数名字 描述
name
必填

Validations:

  • Must be String


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

参数

参数名字 描述
id
必填

Validations:

  • Must be an array of any type


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

参数

参数名字 描述
id
必填

Validations:

  • Must be an array of any type