2.37. hammer host-collection
操作主机组
Usage: hammer host-collection [OPTIONS] SUBCOMMAND [ARG] ... Parameters: SUBCOMMAND Subcommand [ARG] ... Subcommand arguments Subcommands: add-host Add host to the host collection copy Copy a host collection create Create a host collection delete, destroy Destroy a host collection erratum Manipulate errata for a host collection hosts List all hosts info, show Show a host collection list, index List host collections package Manipulate packages for a host collection package-group Manipulate package-groups for a host collection remove-host Remove hosts from the host collection update Update a host collection Options: -h, --help Print help
2.37.1. hammer host-collection add-host
将主机添加到主机组中
Usage: hammer host-collection add-host [OPTIONS] Options: --host-ids HOST_IDS Array of host ids Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --hosts HOST_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 Id of the host collection --name NAME Host collection name to search by --organization ORGANIZATION_NAME Organization name to search by --organization-id ORGANIZATION_ID Organization ID --organization-label ORGANIZATION_LABEL Organization label to search by --organization-title ORGANIZATION_TITLE Organization title -h, --help Print help
2.37.2. hammer host-collection copy
复制主机集合
Usage: hammer host-collection copy [OPTIONS] Options: --id ID ID of the host collection --name NAME Host collection name to search by --new-name NEW_NAME New host collection name --organization ORGANIZATION_NAME Organization name to search by --organization-id ORGANIZATION_ID Organization ID --organization-label ORGANIZATION_LABEL Organization label to search by --organization-title ORGANIZATION_TITLE Organization title -h, --help Print help
2.37.3. hammer host-collection create
创建主机聚合
Usage: hammer host-collection create [OPTIONS] Options: --description DESCRIPTION --host-ids HOST_IDS List of host ids to replace the hosts in host collection Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --hosts HOST_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 --max-hosts MAX_HOSTS Maximum number of hosts in the host collection --name NAME Host Collection name --organization ORGANIZATION_NAME Organization name to search by --organization-id ORGANIZATION_ID Organization identifier --organization-label ORGANIZATION_LABEL Organization label to search by --organization-title ORGANIZATION_TITLE Organization title --unlimited-hosts UNLIMITED_HOSTS Whether or not the host collection may have unlimited hosts One of true/false, yes/no, 1/0. -h, --help Print help
2.37.4. hammer host-collection delete
销毁主机集合
Usage: hammer host-collection <delete|destroy> [OPTIONS] Options: --id ID Id of the host collection --name NAME Host collection name to search by --organization ORGANIZATION_NAME Organization name to search by --organization-id ORGANIZATION_ID Organization ID --organization-label ORGANIZATION_LABEL Organization label to search by --organization-title ORGANIZATION_TITLE Organization title -h, --help Print help
2.37.5. hammer host-collection 勘误
操作主机集合的勘误
Usage: hammer host-collection erratum [OPTIONS] SUBCOMMAND [ARG] ... Parameters: SUBCOMMAND Subcommand [ARG] ... Subcommand arguments Subcommands: install Install errata on content hosts contained within a host collection Options: -h, --help Print help
2.37.5.1. hammer host-collection 勘误安装
在主机集合中包含的内容主机上安装勘误
Usage: hammer host-collection erratum install [OPTIONS] Options: --errata ERRATA List of Errata to install 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 HOST_COLLECTION_ID Host Collection ID --name HOST_COLLECTION_NAME Host Collection Name --organization ORGANIZATION_NAME Organization name to search by --organization-id ORGANIZATION_ID Organization ID --organization-label ORGANIZATION_LABEL Organization label to search by --organization-title ORGANIZATION_TITLE Organization title -h, --help Print help
2.37.6. hammer host-collection 主机
列出所有主机
Usage: hammer host-collection hosts [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 --hostgroup HOSTGROUP_NAME Hostgroup name --hostgroup-id HOSTGROUP_ID ID of host group --hostgroup-title HOSTGROUP_TITLE Hostgroup title --id HOST_COLLECTION_ID Host Collection ID --include INCLUDE Array of extra information types to include Possible value(s): 'parameters', 'all_parameters' --lifecycle-environment LIFECYCLE_ENVIRONMENT_NAME Lifecycle environment name to search by --lifecycle-environment-id LIFECYCLE_ENVIRONMENT_ID --location LOCATION_NAME Set the current location context for the request --location-id LOCATION_ID ID of location --location-title LOCATION_TITLE Set the current location context for the request --name HOST_COLLECTION_NAME Host Collection Name --order ORDER Sort field and order, eg. ‘id DESC’ --organization ORGANIZATION_NAME Organization name to search by --organization-id ORGANIZATION_ID ID of organization --organization-label ORGANIZATION_LABEL Organization label to search by --organization-title ORGANIZATION_TITLE Organization title --page PAGE Page number, starting at 1 --per-page PER_PAGE Number of results per page to return, 'all' to return all results --search SEARCH Filter results --thin THIN Only list ID and name of hosts One of true/false, yes/no, 1/0. -h, --help Print help Predefined field sets: ------------|-----|---------|----- FIELDS | ALL | DEFAULT | THIN ------------|-----|---------|----- Id | x | x | x Name | x | x | x Security | x | | Bugfix | x | | Enhancement | x | | ------------|-----|---------|----- Search / Order fields: activation_key string activation_key_id string addon string addons_status Values: mismatched, matched, not_specified ansible_role string applicable_errata string applicable_errata_issued date applicable_rpms string architecture string autoheal boolean boot_time build Values: true, false class string comment text compute_resource string compute_resource_id integer config_group string content_source string content_view string content_view_id integer created_at datetime cve_id integer domain string domain_id integer environment string errata_status Values: security_needed, errata_needed, updated, unknown execution_status Values: ok, error facts string global_status Values: ok, warning, error has_ip string has_mac string hostgroup string hostgroup_fullname string hostgroup_id integer hostgroup_name string hostgroup_title string hypervisor boolean hypervisor_host string id integer image string insights_recommendations_count integer installable_errata string installed_at datetime ip string job_invocation.id string job_invocation.result Values: cancelled, failed, pending, success last_checkin datetime last_report datetime lifecycle_environment string lifecycle_environment_id integer location string location_id integer mac string managed Values: true, false model string name string organization string organization_id integer origin string os string os_description string os_id integer os_major string os_minor string os_title string owner string owner_id integer owner_type string params string params_name string parent_hostgroup string puppet_ca string puppet_proxy_id integer puppetmaster string purpose_status Values: mismatched, matched, not_specified realm string realm_id integer registered_at datetime registered_through string release_version string reported.boot_time reported.cores reported.disks_total reported.ram reported.sockets reported.virtual role text role_status Values: mismatched, matched, not_specified service_level string sla_status Values: mismatched, matched, not_specified smart_proxy string status.applied integer status.enabled Values: true, false status.failed integer status.failed_restarts integer status.interesting Values: true, false status.pending integer status.restarted integer status.skipped integer subnet string subnet.name text subnet6 string subnet6.name text subscription_id string subscription_name string subscription_status Values: valid, partial, invalid, unknown, disabled, unsubscribed_hypervisor subscription_uuid string trace_status Values: reboot_needed, process_restart_needed, updated upgradable_rpms string usage text usage_status Values: mismatched, matched, not_specified user.firstname string user.lastname string user.login string user.mail string usergroup string usergroup.name string uuid string
2.37.7. hammer host-collection info
显示主机集合
Usage: hammer host-collection <info|show> [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 Id of the host collection --name NAME Host collection name to search by --organization ORGANIZATION_NAME Organization name to search by --organization-id ORGANIZATION_ID Organization identifier --organization-label ORGANIZATION_LABEL Organization label to search by --organization-title ORGANIZATION_TITLE Organization title -h, --help Print help Predefined field sets: ------------|-----|---------|----- FIELDS | ALL | DEFAULT | THIN ------------|-----|---------|----- Id | x | x | x Name | x | x | x Limit | x | x | Description | x | x | Total hosts | x | x | ------------|-----|---------|-----
2.37.8. hammer host-collection list
列出主机组
Usage: hammer host-collection <list|index> [OPTIONS] Options: --activation-key ACTIVATION_KEY_NAME Activation key name to search by --activation-key-id ACTIVATION_KEY_ID Activation key identifier --available-for AVAILABLE_FOR Interpret specified object to return only Host Collections that can be associated with specified object. The value 'host' is supported. --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 --full-result FULL_RESULT Whether or not to show all results One of true/false, yes/no, 1/0. --host HOST_NAME Host name --host-id HOST_ID Filter products by host id --name NAME Host collection name to filter by --order ORDER Sort field and order, eg. 'id DESC' --organization ORGANIZATION_NAME Organization name to search by --organization-id ORGANIZATION_ID Organization identifier --organization-label ORGANIZATION_LABEL Organization label to search by --organization-title ORGANIZATION_TITLE Organization title --page PAGE Page number, starting at 1 --per-page PER_PAGE Number of results per page to return --search SEARCH Search string -h, --help Print help Predefined field sets: ------------|-----|---------|----- FIELDS | ALL | DEFAULT | THIN ------------|-----|---------|----- Id | x | x | x Name | x | x | x Limit | x | x | Description | x | x | ------------|-----|---------|----- Search / Order fields: host string name string organization_id integer
2.37.9. hammer host-collection 软件包
为主机集合操作软件包
Usage: hammer host-collection package [OPTIONS] SUBCOMMAND [ARG] ... Parameters: SUBCOMMAND Subcommand [ARG] ... Subcommand arguments Subcommands: install Install packages on content hosts contained within a host collection remove Remove packages on content hosts contained within a host collection update Update packages on content hosts contained within a host collection Options: -h, --help Print help
2.37.9.1. hammer host-collection 软件包安装
在主机集合中包含的内容主机上安装软件包
Usage: hammer host-collection package install [OPTIONS] Options: --id HOST_COLLECTION_ID Host Collection ID --name HOST_COLLECTION_NAME Host Collection Name --organization ORGANIZATION_NAME Organization name to search by --organization-id ORGANIZATION_ID Organization ID --organization-label ORGANIZATION_LABEL Organization label to search by --organization-title ORGANIZATION_TITLE Organization title --packages PACKAGES Comma-separated list of packages to install Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters -h, --help Print help
2.37.9.2. hammer host-collection 软件包被删除
删除主机集合中包含的内容主机上的软件包
Usage: hammer host-collection package remove [OPTIONS] Options: --id HOST_COLLECTION_ID Host Collection ID --name HOST_COLLECTION_NAME Host Collection Name --organization ORGANIZATION_NAME Organization name to search by --organization-id ORGANIZATION_ID Organization ID --organization-label ORGANIZATION_LABEL Organization label to search by --organization-title ORGANIZATION_TITLE Organization title --packages PACKAGES Comma-separated list of packages to install Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters -h, --help Print help
2.37.9.3. hammer host-collection 软件包更新
更新主机集合中包含的内容主机上的软件包
Usage: hammer host-collection package update [OPTIONS] Options: --id HOST_COLLECTION_ID Host Collection ID --name HOST_COLLECTION_NAME Host Collection Name --organization ORGANIZATION_NAME Organization name to search by --organization-id ORGANIZATION_ID Organization ID --organization-label ORGANIZATION_LABEL Organization label to search by --organization-title ORGANIZATION_TITLE Organization title --packages PACKAGES Comma-separated list of packages to install Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters -h, --help Print help
2.37.10. hammer host-collection package-group
为主机组操作软件包组
Usage: hammer host-collection package-group [OPTIONS] SUBCOMMAND [ARG] ... Parameters: SUBCOMMAND Subcommand [ARG] ... Subcommand arguments Subcommands: install Install package-groups on content hosts contained within a host collection remove Remove package-groups on content hosts contained within a host collection update Update package-groups on content hosts contained within a host collection Options: -h, --help Print help
2.37.10.1. hammer host-collection package-group install
在主机集合中包含的内容主机上安装软件包组
Usage: hammer host-collection package-group install [OPTIONS] Options: --id HOST_COLLECTION_ID Host Collection ID --name HOST_COLLECTION_NAME Host Collection Name --organization ORGANIZATION_NAME Organization name to search by --organization-id ORGANIZATION_ID Organization ID --organization-label ORGANIZATION_LABEL Organization label to search by --organization-title ORGANIZATION_TITLE Organization title --package-groups PACKAGE-GROUPS Comma-separated list of package-groups to install Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters -h, --help Print help
2.37.10.2. hammer host-collection package-group remove
删除主机集合中包含的内容主机上的软件包组
Usage: hammer host-collection package-group remove [OPTIONS] Options: --id HOST_COLLECTION_ID Host Collection ID --name HOST_COLLECTION_NAME Host Collection Name --organization ORGANIZATION_NAME Organization name to search by --organization-id ORGANIZATION_ID Organization ID --organization-label ORGANIZATION_LABEL Organization label to search by --organization-title ORGANIZATION_TITLE Organization title --package-groups PACKAGE-GROUPS Comma-separated list of package-groups to install Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters -h, --help Print help
2.37.10.3. hammer host-collection package-group update
更新主机集合中包含的内容主机上的软件包组
Usage: hammer host-collection package-group update [OPTIONS] Options: --id HOST_COLLECTION_ID Host Collection ID --name HOST_COLLECTION_NAME Host Collection Name --organization ORGANIZATION_NAME Organization name to search by --organization-id ORGANIZATION_ID Organization ID --organization-label ORGANIZATION_LABEL Organization label to search by --organization-title ORGANIZATION_TITLE Organization title --package-groups PACKAGE-GROUPS Comma-separated list of package-groups to install Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters -h, --help Print help
2.37.11. hammer host-collection remove-host
从主机组中删除主机
Usage: hammer host-collection remove-host [OPTIONS] Options: --host-ids HOST_IDS Array of host ids Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --hosts HOST_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 Id of the host collection --name NAME Host collection name to search by --organization ORGANIZATION_NAME Organization name to search by --organization-id ORGANIZATION_ID Organization ID --organization-label ORGANIZATION_LABEL Organization label to search by --organization-title ORGANIZATION_TITLE Organization title -h, --help Print help
2.37.12. hammer host-collection 更新
更新主机集合
Usage: hammer host-collection update [OPTIONS] Options: --description DESCRIPTION --host-ids HOST_IDS List of host ids to replace the hosts in host collection Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --hosts HOST_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 Id of the host collection --max-hosts MAX_HOSTS Maximum number of hosts in the host collection --name NAME Host collection name to search by --new-name NEW_NAME Host Collection name --organization ORGANIZATION_NAME Organization name to search by --organization-id ORGANIZATION_ID Organization ID --organization-label ORGANIZATION_LABEL Organization label to search by --organization-title ORGANIZATION_TITLE Organization title --unlimited-hosts UNLIMITED_HOSTS Whether or not the host collection may have unlimited hosts One of true/false, yes/no, 1/0. -h, --help Print help