2.34. hammer hostgroup

ホストグループを操作します。

Usage:
    hammer hostgroup [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    Subcommand
 [ARG] ...                     Subcommand arguments

Subcommands:
 ansible-roles                 Manage Ansible roles on a hostgroup
 create                        Create a host group
 delete                        Delete a host group
 delete-parameter              Delete parameter for a hostgroup
 info                          Show a host group
 list                          List all host groups
 puppet-classes                List all Puppet classes
 rebuild-config                Rebuild orchestration config
 sc-params                     List all smart class parameters
 set-parameter                 Create or update parameter for a hostgroup
 smart-variables               List all smart variables
 update                        Update a host group

Options:
 -h, --help                    Print help

2.34.1. hammer hostgroup ansible-roles

ホストグループで Ansible ロールを実行します。

Usage:
    hammer hostgroup ansible-roles [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    Subcommand
 [ARG] ...                     Subcommand arguments

Subcommands:
 assign                        Assigns Ansible roles to a hostgroup
 list                          List all Ansible roles for a hostgroup
 play                          Runs all Ansible roles on a hostgroup

Options:
 -h, --help                    Print help

2.34.1.1. hammer hostgroup ansible-roles assign

Ansible ロールをホストグループに割り当てます。

Usage:
    hammer hostgroup ansible-roles assign [OPTIONS]

Options:
 --ansible-role-ids ANSIBLE_ROLE_IDS     Ansible roles to assign to a hostgroup
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --ansible-roles ANSIBLE_ROLE_NAMES      Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --id ID
 --location LOCATION_NAME                Location name
 --location-id LOCATION_ID
 --location-title LOCATION_TITLE         Location title
 --name NAME                             Hostgroup name
 --organization ORGANIZATION_NAME        Organization name
 --organization-id ORGANIZATION_ID       Organization ID
 --organization-title ORGANIZATION_TITLE Organization title
 --title TITLE                           Hostgroup title
 -h, --help                              Print help

2.34.1.2. hammer hostgroup ansible-roles list

ホストグループの Ansible ロールをすべて一覧表示します。

Usage:
    hammer hostgroup ansible-roles list [OPTIONS]

Options:
 --fields FIELDS                         Show specified fileds or predefined filed sets only. (See below)
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --id ID
 --location LOCATION_NAME                Location name
 --location-id LOCATION_ID
 --location-title LOCATION_TITLE         Location title
 --name NAME                             Hostgroup name
 --organization ORGANIZATION_NAME        Organization name
 --organization-id ORGANIZATION_ID       Organization ID
 --organization-title ORGANIZATION_TITLE Organization title
 --title TITLE                           Hostgroup title
 -h, --help                              Print help

Predefined field sets:
  ------------|-----|---------|-----
  FIELDS      | ALL | DEFAULT | THIN
  ------------|-----|---------|-----
  Id          | x   | x       | x
  Name        | x   | x       | x
  Imported at | x   | x       |
  ------------|-----|---------|-----

2.34.1.3. hammer hostgroup ansible-roles play

ホストグループに対して全 Ansible ロールを実行します。

Usage:
    hammer hostgroup ansible-roles play [OPTIONS]

Options:
 --id ID
 --location LOCATION_NAME                Location name
 --location-id LOCATION_ID
 --location-title LOCATION_TITLE         Location title
 --name NAME                             Hostgroup name
 --organization ORGANIZATION_NAME        Organization name
 --organization-id ORGANIZATION_ID       Organization ID
 --organization-title ORGANIZATION_TITLE Organization title
 --title TITLE                           Hostgroup title
 -h, --help                              Print help