2.36. hammer hostgroup

Manipulate hostgroups

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, destroy               Delete a host group
 delete-parameter              Delete parameter for a hostgroup
 info, show                    Show a host group
 list, index                   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
 update                        Update a host group

Options:
 -h, --help                    Print help

2.36.1. hammer hostgroup ansible-roles

Manage Ansible roles on a hostgroup

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

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

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

Options:
 -h, --help                    Print help

2.36.1.1. hammer hostgroup ansible-roles assign

Assigns Ansible roles to a hostgroup

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                Set the current location context for the request
 --location-id LOCATION_ID               Set the current location context for the request
 --location-title LOCATION_TITLE         Set the current location context for the request
 --name NAME                             Hostgroup name
 --organization ORGANIZATION_NAME        Set the current organization context for the request
 --organization-id ORGANIZATION_ID       Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE Set the current organization context for the request
 --title TITLE                           Hostgroup title
 -h, --help                              Print help

2.36.1.2. hammer hostgroup ansible-roles list

List all Ansible roles for a hostgroup

Usage:
    hammer hostgroup ansible-roles <list|index> [OPTIONS]

Options:
 --fields FIELDS                         Show specified fields or predefined field 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                Set the current location context for the request
 --location-id LOCATION_ID               Set the current location context for the request
 --location-title LOCATION_TITLE         Set the current location context for the request
 --name NAME                             Hostgroup name
 --organization ORGANIZATION_NAME        Set the current organization context for the request
 --organization-id ORGANIZATION_ID       Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE Set the current organization context for the request
 --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.36.1.3. hammer hostgroup ansible-roles play

Runs all Ansible roles on a hostgroup

Usage:
    hammer hostgroup ansible-roles play [OPTIONS]

Options:
 --id ID
 --location LOCATION_NAME                Set the current location context for the request
 --location-id LOCATION_ID               Set the current location context for the request
 --location-title LOCATION_TITLE         Set the current location context for the request
 --name NAME                             Hostgroup name
 --organization ORGANIZATION_NAME        Set the current organization context for the request
 --organization-id ORGANIZATION_ID       Set the current organization context for the request
 --organization-title ORGANIZATION_TITLE Set the current organization context for the request
 --title TITLE                           Hostgroup title
 -h, --help                              Print help