2.36. hammer 主机


操作主机

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

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

Subcommands:
 ansible-roles                 Manage Ansible roles on a host
 boot                          Boot host from specified device
 config-reports                List all reports
 create                        Create a host
 deb-package                   Manage deb packages on your hosts
 delete, destroy               Delete a host
 delete-parameter              Delete parameter for a host
 disassociate                  Disassociate a host
 enc-dump                      Dump host's ENC YAML
 errata                        Manage errata on your hosts
 facts                         List all fact values
 info, show                    Show a host
 interface                     View and manage host's network interfaces
 list, index                   List all hosts
 package                       Manage packages on your hosts
 package-group                 Manage package-groups on your hosts
 policies-enc                  View policies ENC for host
 puppet-classes                List all Puppet classes
 reboot                        Reboot a host
 rebuild-config                Rebuild orchestration related configurations for host
 reports                       List all reports
 reset                         Reset a host
 sc-params                     List all smart class parameters
 set-parameter                 Create or append a parameter for a host
 start                         Power a host on
 status                        Get status of host
 stop                          Power a host off
 subscription                  Manage subscription information on your hosts
 traces                        List traces on your hosts
 update                        Update a host

Options:
 -h, --help                    Print help

2.36.1. hammer 主机 ansible-roles

管理主机上的 Ansible 角色

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

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

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

Options:
 -h, --help                    Print help

2.36.1.1. hammer 主机 ansible-roles 分配

将 Ansible 角色分配给主机

Usage:
    hammer host ansible-roles assign [OPTIONS]

Options:
 --ansible-role-ids ANSIBLE_ROLE_IDS     Ansible roles to assign to a host
                                         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                             Host 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
 -h, --help                              Print help

2.36.1.2. hammer host ansible-roles list

列出主机的所有 Ansible 角色

Usage:
    hammer host 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                             Host 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
 -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 主机 ansible-roles play

在主机上运行所有 Ansible 角色

Usage:
    hammer host 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                             Host 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
 -h, --help                              Print help

2.36.2. hammer 主机引导

从指定设备引导主机

Usage:
    hammer host boot [OPTIONS]

Options:
 --device DEVICE                         Boot device, valid devices are disk, cdrom, pxe, bios
 --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                             Host 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
 -h, --help                              Print help

2.36.3. hammer 主机 config-reports

列出所有报告

Usage:
    hammer host config-reports [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                                 Host 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                             Host name
 --order ORDER                           Sort field and order, eg. ‘id DESC’
 --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
 --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
 -h, --help                              Print help

Predefined field sets:
  -----------------|-----|---------|-----
  FIELDS           | ALL | DEFAULT | THIN
  -----------------|-----|---------|-----
  Id               | x   | x       | x
  Host             | x   | x       |
  Last report      | x   | x       |
  Origin           | x   | x       |
  Applied          | x   | x       |
  Restarted        | x   | x       |
  Failed           | x   | x       |
  Restart failures | x   | x       |
  Skipped          | x   | x       |
  Pending          | x   | x       |
  -----------------|-----|---------|-----

Search / Order fields:
  applied             integer
  environment         string
  eventful            Values: true, false
  failed              integer
  failed_restarts     integer
  host                string
  host_id             integer
  hostgroup           string
  hostgroup_fullname  string
  hostgroup_title     string
  last_report         datetime
  location            string
  log                 text
  organization        string
  origin              string
  pending             integer
  reported            datetime
  resource            text
  restarted           integer
  skipped             integer

2.36.4. hammer 主机创建

创建主机

Usage:
    hammer host create [OPTIONS]

Options:
 --ansible-role-ids ANSIBLE_ROLE_IDS                           IDs of associated ansible roles
                                                               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
 --architecture ARCHITECTURE_NAME                              Architecture name
 --architecture-id ARCHITECTURE_ID                             Required if host is managed and value is not inherited from host group
 --ask-root-password ASK_ROOT_PW                               One of true/false, yes/no, 1/0.
 --autoheal AUTOHEAL                                           Sets whether the Host will autoheal subscriptions upon checkin
                                                               One of true/false, yes/no, 1/0.
 --build BUILD                                                 One of true/false, yes/no, 1/0.
 --comment COMMENT                                             Additional information about this host
 --compute-attributes COMPUTE_ATTRS                            Compute resource attributes
                                                               Comma-separated list of key=value.
                                                               JSON is acceptable and preferred way for complex parameters
 --compute-profile COMPUTE_PROFILE_NAME                        Compute profile name
 --compute-profile-id COMPUTE_PROFILE_ID
 --compute-resource COMPUTE_RESOURCE_NAME                      Compute resource name
 --compute-resource-id COMPUTE_RESOURCE_ID                     Nil means host is bare metal
 --config-group-ids CONFIG_GROUP_IDS                           IDs of associated config groups
                                                               Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                                               JSON is acceptable and preferred way for complex parameters
 --config-groups CONFIG_GROUP_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
 --content-source CONTENT_SOURCE_NAME                          Content Source name
 --content-source-id CONTENT_SOURCE_ID
 --content-view CONTENT_VIEW_NAME                              Name to search by
 --content-view-id CONTENT_VIEW_ID
 --domain DOMAIN_NAME                                          Domain name
 --domain-id DOMAIN_ID                                         Required if host is managed and value is not inherited from host group
 --enabled ENABLED                                             Include this host within Satellite reporting
                                                               One of true/false, yes/no, 1/0.
 --environment ENVIRONMENT_NAME                                Environment name (--environment is deprecated: Use --puppet-environment[-id] instead)
 --environment-id ENVIRONMENT_ID                               (--environment-id is deprecated: Use --puppet-environment[-id] instead)
 --hostgroup HOSTGROUP_NAME                                    Hostgroup name
 --hostgroup-id HOSTGROUP_ID
 --hostgroup-title HOSTGROUP_TITLE                             Hostgroup title
 --hypervisor-guest-uuids HYPERVISOR_GUEST_UUIDS               List of hypervisor guest uuids
                                                               Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                                               JSON is acceptable and preferred way for complex parameters
 --image IMAGE_NAME                                            Name to search by
 --image-id IMAGE_ID
 --installed-products-attributes INSTALLED_PRODUCTS_ATTRIBUTES List of products installed on the host
                                                               Comma separated list of values defined by a schema. See Option details section below.
                                                               JSON is acceptable and preferred way for complex parameters
 --interface INTERFACE                                         Interface parameters
                                                               Comma-separated list of key=value.
                                                               JSON is acceptable and preferred way for complex parameters
                                                               Can be specified multiple times.
 --ip IP                                                       Not required if using a subnet with DHCP Capsule
 --kickstart-repository REPOSITORY_NAME                        Kickstart repository name
 --kickstart-repository-id KICKSTART_REPOSITORY_ID             Repository Id associated with the kickstart repo used for provisioning
 --lifecycle-environment LIFECYCLE_ENVIRONMENT_NAME            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                                     Set the current location context for the request
 --location-title LOCATION_TITLE                               Set the current location context for the request
 --mac MAC                                                     Required for managed host that is bare metal, not required if it's a virtual machine
 --managed MANAGED                                             True/False flag whether a host is managed or unmanaged. Note: this value also determines whether several parameters are required or not
                                                               One of true/false, yes/no, 1/0.
 --medium MEDIUM_NAME                                          Medium name
 --medium-id MEDIUM_ID                                         Required if not imaged based provisioning and host is managed and value is not inherited from host group
 --model MODEL_NAME                                            Model name
 --model-id MODEL_ID
 --name NAME
 --openscap-proxy-id OPENSCAP_PROXY_ID                         ID of OpenSCAP Capsule
 --operatingsystem OPERATINGSYSTEM_TITLE                       Operating system title
 --operatingsystem-id OPERATINGSYSTEM_ID                       Required if host is managed and value is not inherited from host group
 --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
 --overwrite OVERWRITE                                         One of true/false, yes/no, 1/0.
                                                               Default: "true"
 --owner OWNER_LOGIN                                           Login of the owner
 --owner-id OWNER_ID                                           ID of the owner
 --owner-type OWNER_TYPE                                       Host's owner type
                                                               Possible value(s): 'User', 'Usergroup'
 --parameters PARAMS                                           Replaces with new host parameters
                                                               Comma-separated list of key=value.
                                                               JSON is acceptable and preferred way for complex parameters
 --partition-table PARTITION_TABLE_NAME                        Partition table name
 --partition-table-id PARTITION_TABLE_ID
 --product PRODUCT_NAME                                        Name to search by
 --product-id PRODUCT_ID                                       Product id as listed from a host's installed products,         this is not the same product id as the products api returns
 --progress-report-id PROGRESS_REPORT_ID                       UUID to track orchestration tasks status, GET /api/orchestration/:UUID/tasks
 --provision-method PROVISION_METHOD                           The method used to provision the host.
                                                               Possible value(s): 'build', 'image', 'bootdisk'
 --puppet-ca-proxy PUPPET_CA_PROXY_NAME
 --puppet-ca-proxy-id PUPPET_CA_PROXY_ID                       Puppet CA Capsule ID
 --puppet-class-ids PUPPET_CLASS_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
 --puppet-classes PUPPET_CLASS_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
 --puppet-environment PUPPET_ENVIRONMENT_NAME                  Puppet environment name
 --puppet-environment-id PUPPET_ENVIRONMENT_ID
 --puppet-proxy PUPPET_PROXY_NAME
 --puppet-proxy-id PUPPET_PROXY_ID                             Puppet Capsule ID
 --purpose-addons PURPOSE_ADDONS                               Sets the system add-ons
                                                               Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                                               JSON is acceptable and preferred way for complex parameters
 --purpose-role PURPOSE_ROLE                                   Sets the system purpose usage
 --purpose-usage PURPOSE_USAGE                                 Sets the system purpose usage
 --pxe-loader PXE_LOADER                                       DHCP filename option (Grub2/PXELinux by default)
                                                               Possible value(s): 'None', 'PXELinux BIOS', 'PXELinux UEFI', 'Grub UEFI', 'Grub2 BIOS', 'Grub2 ELF', 'Grub2 UEFI', 'Grub2 UEFI SecureBoot', 'Grub2 UEFI HTTP', 'Grub2 UEFI HTTPS', 'Grub2 UEFI HTTPS SecureBoot', 'iPXE Embedded', 'iPXE UEFI HTTP', 'iPXE Chain BIOS', 'iPXE Chain UEFI'
 --realm REALM_NAME                                            Name to search by
 --realm-id REALM_ID
 --release-version RELEASE_VERSION                             Release version for this Host to use (7Server, 7.1, etc)
 --root-password ROOT_PW                                       Required if host is managed and value is not inherited from host group or default password in settings
 --service-level SERVICE_LEVEL                                 Service level to be used for autoheal
 --subnet SUBNET_NAME                                          Subnet name
 --subnet-id SUBNET_ID                                         Required if host is managed and value is not inherited from host group
 --typed-parameters TYPED_PARAMS                               Replaces with new host parameters (with type support)
                                                               Comma separated list of values defined by a schema. See Option details section below.
                                                               JSON is acceptable and preferred way for complex parameters
 --volume VOLUME                                               Volume parameters
                                                               Comma-separated list of key=value.
                                                               JSON is acceptable and preferred way for complex parameters
                                                               Can be specified multiple times.
 -h, --help                                                    Print help

Option details:
  Following parameters accept format defined by its schema (bold are required; <> contain acceptable type; [] contain acceptable value):

  --typed-parameters  "name=<string>\,value=<string>\,parameter_type=[string|boolean|integer|real|array|hash|yaml|json]\,hidden_value=[true|false|1|0], ... "

  --installed-products-attributes  "product_id=<string>\,product_name=<string>\,arch=<string>\,version=<string>, ... "

Available keys for --interface:
  mac
  ip
  type                Possible values: interface, bmc, bond, bridge
  name
  subnet_id
  domain_id
  identifier
  managed             true/false
  primary             true/false, each managed hosts needs to have one primary interface.
  provision           true/false
  virtual             true/false

  For virtual=true:
    tag                 VLAN tag, this attribute has precedence over the subnet VLAN ID. Only for virtual interfaces.
    attached_to         Identifier of the interface to which this interface belongs, e.g. eth1.

  For type=bond:
    mode                Possible values: balance-rr, active-backup, balance-xor, broadcast, 802.3ad, balance-tlb, balance-alb
    attached_devices    Identifiers of slave interfaces, e.g. [eth1,eth2]
    bond_options

  For type=bmc:
    provider            always IPMI
    username
    password

Provider specific options:
  NOTE: Bold attributes are required.

  EC2:
    --volume:


    --interface:


    --compute-attributes:
      availability_zone
      flavor_id
      groups
      security_group_ids
      managed_ip

  GCE:
    --volume:
      size_gb             Volume size in GB, integer value

    --interface:


    --compute-attributes:
      machine_type
      network
      associate_external_ip

  Libvirt:
    --volume:
      pool_name                    One of available storage pools
      capacity                     String value, e.g. 10G
      allocation
      Initial allocation, e.g. 0G
      format_type                  Possible values: raw, qcow2

    --interface:
      compute_type                            Possible values: bridge, network
      compute_bridge                          Name of interface according to type
      compute_model                           Possible values: virtio, rtl8139, ne2k_pci, pcnet, e1000
      compute_network
      Libvirt instance network, e.g. default

    --compute-attributes:
      cpus                Number of CPUs
      memory              String, amount of memory, value in bytes
      cpu_mode            Possible values: default, host-model, host-passthrough
      start               Boolean (expressed as 0 or 1), whether to start the machine or not

  OpenStack:
    --volume:


    --interface:


    --compute-attributes:
      availability_zone
      boot_from_volume
      flavor_ref
      image_ref
      tenant_id
      security_groups
      network

  oVirt:
    --volume:
      size_gb             Volume size in GB, integer value
      storage_domain      ID or name of storage domain
      bootable            Boolean, set 1 for bootable, only one volume can be bootable
      preallocate         Boolean, set 1 to preallocate
      wipe_after_delete   Boolean, set 1 to wipe disk after delete
      interface           Disk interface name, must be ide, virto or virto_scsi

    --interface:
      compute_name          Compute name, e.g. eth0
      compute_network       Select one of available networks for a cluster, must be an ID or a name
      compute_interface     Interface type
      compute_vnic_profile  Vnic Profile

    --compute-attributes:
      cluster             ID or name of cluster to use
      template            Hardware profile to use
      cores               Integer value, number of cores
      sockets             Integer value, number of sockets
      memory              Amount of memory, integer value in bytes
      ha                  Boolean, set 1 to high availability
      display_type        Possible values: VNC, SPICE
      keyboard_layout     Possible values: ar, de-ch, es, fo, fr-ca, hu, ja, mk, no, pt-br, sv, da, en-gb, et, fr, fr-ch, is, lt, nl, pl, ru, th, de, en-us, fi, fr-be, hr, it, lv, nl-be, pt, sl, tr. Not usable if display type is SPICE.
      start               Boolean, set 1 to start the vm

  Rackspace:
    --volume:


    --interface:


    --compute-attributes:
      flavor_id

  VMware:
    --volume:
      name
      storage_pod         Storage Pod ID from VMware
      datastore           Datastore ID from VMware
      mode                persistent/independent_persistent/independent_nonpersistent
      size_gb             Integer number, volume size in GB
      thin                true/false
      eager_zero          true/false
      controller_key      Associated SCSI controller key

    --interface:
      compute_type        Type of the network adapter, for example one of:
                            VirtualVmxnet3
                            VirtualE1000
                          See documentation center for your version of vSphere to find more details about available adapter types:
                            https://www.vmware.com/support/pubs/
      compute_network     Network ID or Network Name from VMware

    --compute-attributes:
      cluster              Cluster ID from VMware
      corespersocket       Number of cores per socket (applicable to hardware versions < 10 only)
      cpus                 CPU count
      memory_mb            Integer number, amount of memory in MB
      path                 Path to folder
      resource_pool        Resource Pool ID from VMware
      firmware             automatic/bios/efi
      guest_id             Guest OS ID form VMware
      hardware_version     Hardware version ID from VMware
      memoryHotAddEnabled  Must be a 1 or 0, lets you add memory resources while the machine is on
      cpuHotAddEnabled     Must be a 1 or 0, lets you add CPU resources while the machine is on
      add_cdrom            Must be a 1 or 0, Add a CD-ROM drive to the virtual machine
      annotation           Annotation Notes
      scsi_controllers     List with SCSI controllers definitions
                             type - ID of the controller from VMware
                             key  - Key of the controller (e.g. 1000)
      start                Must be a 1 or 0, whether to start the machine or not

  AzureRM:
    --volume:
      disk_size_gb        Volume Size in GB (integer value)
      data_disk_caching   Data Disk Caching (None, ReadOnly, ReadWrite)

    --interface:
      compute_network     Select one of available Azure Subnets, must be an ID
      compute_public_ip   Public IP (None, Static, Dynamic)
      compute_private_ip  Static Private IP (expressed as true or false)

    --compute-attributes:
      resource_group      Existing Azure Resource Group of user
      vm_size             VM Size, eg. Standard_A0 etc.
      username            The Admin username
      password            The Admin password
      platform            OS type eg. Linux
      ssh_key_data        SSH key for passwordless authentication
      os_disk_caching     OS disk caching
      premium_os_disk     Premium OS Disk, Boolean as 0 or 1
      script_command      Custom Script Command
      script_uris         Comma seperated file URIs

2.36.5. hammer 主机 deb-package

管理主机上的 deb 软件包

Usage:
    hammer host deb-package [OPTIONS] SUBCOMMAND [ARG] ...

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

Subcommands:
 list, index                   List deb packages installed on the host

Options:
 -h, --help                    Print help

2.36.5.1. hammer 主机 deb-package 列表

列出主机上安装的 deb 软件包

Usage:
    hammer host deb-package <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
 --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             ID of the host
 --order ORDER                 Sort field and order, eg. 'id DESC'
 --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
  Version | x   | x       |
  Arch    | x   | x       |
  --------|-----|---------|-----

2.36.6. hammer host delete

删除主机

Usage:
    hammer host <delete|destroy> [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                             Host 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
 -h, --help                              Print help

2.36.7. hammer host delete-parameter

主机的 delete 参数

Usage:
    hammer host delete-parameter [OPTIONS]

Options:
 --host HOST_NAME              Host name
 --host-id HOST_ID
 --name NAME                   Parameter name
 -h, --help                    Print help

2.36.8. hammer 主机解除关联

解除主机解除关联

Usage:
    hammer host disassociate [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                             Host 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
 -h, --help                              Print help

2.36.9. hammer 主机 enc-dump

转储主机的 ENC YAML

Usage:
    hammer host enc-dump [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                             Host 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
 -h, --help                              Print help

2.36.10. hammer 主机勘误表

管理主机上的勘误

Usage:
    hammer host errata [OPTIONS] SUBCOMMAND [ARG] ...

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

Subcommands:
 apply                         Schedule errata for installation using katello-agent. NOTE: Katello-agent is deprecated and will be removed in a future release. Consider using remote execution instead.
 info                          Retrieve a single errata for a host
 list                          List errata available for the content host
 recalculate                   Force regenerate applicability.

Options:
 -h, --help                    Print help

2.36.10.1. 应用 hammer 主机勘误

使用 katello-agent 调度安装的勘误。注意: Katello-agent 已被弃用,并将在以后的发行版本中删除。考虑改为使用远程执行。

Usage:
    hammer host errata apply [OPTIONS]

Options:
 --async                       Do not wait for the task
 --errata-ids ERRATA_IDS       List of Errata ids to install. Will be removed in a future release
                               Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                               JSON is acceptable and preferred way for complex parameters
 --host HOST_NAME              Host name
 --host-id HOST_ID             Host ID
 --ids IDS                     List of errata ids to perform an action on, (ex: RHSA-2019:1168)
                               Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                               JSON is acceptable and preferred way for complex parameters
 --search SEARCH               Search string for erratum to perform an action on
 -h, --help                    Print help

2.36.10.2. hammer 主机勘误表信息

检索主机的单个勘误

Usage:
    hammer host errata info [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
 --host HOST_NAME              Host name
 --host-id HOST_ID             Host ID
 --id ID                       Errata id of the erratum (RHSA-2012:108)
 --name NAME                   Name to search by
 -h, --help                    Print help

Predefined field sets:
  ------------------------|-----|--------
  FIELDS                  | ALL | DEFAULT
  ------------------------|-----|--------
  Title                   | x   | x
  Version                 | x   | x
  Description             | x   | x
  Status                  | x   | x
  Id                      | x   | x
  Errata id               | x   | x
  Reboot suggested        | x   | x
  Updated                 | x   | x
  Issued                  | x   | x
  Release                 | x   | x
  Solution                | x   | x
  Packages                | x   | x
  Module streams/name     | x   | x
  Module streams/stream   | x   | x
  Module streams/packages | x   | x
  ------------------------|-----|--------

2.36.10.3. hammer 主机勘误表列表

列出可用于内容主机的勘误

Usage:
    hammer host errata list [OPTIONS]

Options:
 --content-view CONTENT_VIEW_NAME                    Content view name to search by
 --content-view-id CONTENT_VIEW_ID                   Calculate Applicable Errata based on a particular Content View
 --environment ENVIRONMENT_NAME                      Lifecycle environment name to search by (--environment is deprecated: Use --lifecycle-environment instead)
 --environment-id ENVIRONMENT_ID                     (--environment-id is deprecated: Use --lifecycle-environment-id instead)
 --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                                   UUID of the content host
 --lifecycle-environment LIFECYCLE_ENVIRONMENT_NAME  Lifecycle environment name to search by
 --lifecycle-environment-id LIFECYCLE_ENVIRONMENT_ID
 --order ORDER                                       Sort field and order, eg. 'id DESC'
 --organization ORGANIZATION_NAME                    Organization name to search by
 --organization-id ORGANIZATION_ID                   Organization ID to search by
 --organization-label ORGANIZATION_LABEL             Organization label to search by
 --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
  ------------|-----|--------
  Id          | x   | x
  Erratum id  | x   | x
  Type        | x   | x
  Title       | x   | x
  Installable | x   | x
  ------------|-----|--------

2.36.10.4. rehammer 主机勘误重新计算

强制重新生成适用性。

Usage:
    hammer host errata recalculate [OPTIONS]

Options:
 --async                       Do not wait for the task
 --host HOST_NAME              Host name
 --host-id HOST_ID             Host ID
 -h, --help                    Print help

2.36.11. hammer 主机事实

列出所有事实值

Usage:
    hammer host facts [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                             Host name
 --order ORDER                           Sort field and order, eg. ‘id DESC’
 --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
 --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
 -h, --help                              Print help

Predefined field sets:
  -------|-----|--------
  FIELDS | ALL | DEFAULT
  -------|-----|--------
  Fact   | x   | x
  Value  | x   | x
  -------|-----|--------

Search / Order fields:
  fact                string
  fact_short_name     string
  facts               string
  host                string
  host.hostgroup      string
  host_id             integer
  location            string
  location_id         integer
  name                string
  organization        string
  organization_id     integer
  origin              string
  reported_at         datetime
  short_name          string
  type                string
  value               string

2.36.12. hammer 主机信息

显示主机

Usage:
    hammer host <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
 --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                                     Host 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
 --show-hidden-parameters SHOW_HIDDEN_PARAMETERS Display hidden parameter values
                                                 One of true/false, yes/no, 1/0.
 -h, --help                                      Print help

Predefined field sets:
  --------------------------------------------------------|-----|---------|-----
  FIELDS                                                  | ALL | DEFAULT | THIN
  --------------------------------------------------------|-----|---------|-----
  Id                                                      | x   | x       | x
  Uuid                                                    | x   | x       |
  Name                                                    | x   | x       | x
  Organization                                            | x   | x       |
  Location                                                | x   | x       |
  Host group                                              | x   | x       |
  Compute resource                                        | x   | x       |
  Compute profile                                         | x   | x       |
  Puppet environment                                      | x   | x       |
  Puppet ca proxy                                         | x   | x       |
  Puppet master proxy                                     | x   | x       |
  Cert name                                               | x   | x       |
  Managed                                                 | x   | x       |
  Installed at                                            | x   | x       |
  Last report                                             | x   | x       |
  Uptime (seconds)                                        | x   | x       |
  Status/global status                                    | x   | x       |
  Status/build status                                     | x   | x       |
  Network/ipv4 address                                    | x   | x       |
  Network/ipv6 address                                    | x   | x       |
  Network/mac                                             | x   | x       |
  Network/subnet ipv4                                     | x   | x       |
  Network/subnet ipv6                                     | x   | x       |
  Network/domain                                          | x   | x       |
  Network/service provider/sp name                        | x   | x       |
  Network/service provider/sp ip                          | x   | x       |
  Network/service provider/sp mac                         | x   | x       |
  Network/service provider/sp subnet                      | x   | x       |
  Network interfaces/id                                   | x   | x       |
  Network interfaces/identifier                           | x   | x       |
  Network interfaces/type                                 | x   | x       |
  Network interfaces/mac address                          | x   | x       |
  Network interfaces/ipv4 address                         | x   | x       |
  Network interfaces/ipv6 address                         | x   | x       |
  Network interfaces/fqdn                                 | x   | x       |
  Operating system/architecture                           | x   | x       |
  Operating system/operating system                       | x   | x       |
  Operating system/build                                  | x   | x       |
  Operating system/medium                                 | x   | x       |
  Operating system/partition table                        | x   | x       |
  Operating system/pxe loader                             | x   | x       |
  Operating system/custom partition table                 | x   | x       |
  Operating system/image                                  | x   | x       |
  Operating system/image file                             | x   | x       |
  Operating system/use image                              | x   | x       |
  Parameters/                                             | x   | x       |
  All parameters/                                         | x   | x       |
  Additional info/owner                                   | x   | x       |
  Additional info/owner id                                | x   | x       |
  Additional info/owner type                              | x   | x       |
  Additional info/enabled                                 | x   | x       |
  Additional info/model                                   | x   | x       |
  Additional info/comment                                 | x   | x       |
  Openscap proxy                                          | x   | x       |
  Content information/content view/id                     | x   | x       |
  Content information/content view/name                   | x   | x       |
  Content information/lifecycle environment/id            | x   | x       |
  Content information/lifecycle environment/name          | x   | x       |
  Content information/content source/id                   | x   | x       |
  Content information/content source/name                 | x   | x       |
  Content information/kickstart repository/id             | x   | x       |
  Content information/kickstart repository/name           | x   | x       |
  Content information/applicable packages                 | x   | x       |
  Content information/upgradable packages                 | x   | x       |
  Content information/applicable errata/enhancement       | x   | x       |
  Content information/applicable errata/bug fix           | x   | x       |
  Content information/applicable errata/security          | x   | x       |
  Subscription information/uuid                           | x   | x       |
  Subscription information/last checkin                   | x   | x       |
  Subscription information/release version                | x   | x       |
  Subscription information/autoheal                       | x   | x       |
  Subscription information/registered to                  | x   | x       |
  Subscription information/registered at                  | x   | x       |
  Subscription information/registered by activation keys/ | x   | x       |
  Subscription information/system purpose/service level   | x   | x       |
  Subscription information/system purpose/purpose usage   | x   | x       |
  Subscription information/system purpose/purpose role    | x   | x       |
  Subscription information/system purpose/purpose addons  | x   | x       |
  Trace status                                            | x   | x       |
  Host collections/id                                     | x   | x       |
  Host collections/name                                   | x   | x       |
  --------------------------------------------------------|-----|---------|-----

2.36.13. hammer 主机接口

查看和管理主机的网络接口

Usage:
    hammer host interface [OPTIONS] SUBCOMMAND [ARG] ...

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

Subcommands:
 create                        Create an interface on a host
 delete, destroy               Delete a host's interface
 info, show                    Show an interface for host
 list, index                   List all interfaces for host
 update                        Update a host's interface

Options:
 -h, --help                    Print help

2.36.13.1. hammer 主机接口创建

在主机上创建接口

Usage:
    hammer host interface create [OPTIONS]

Options:
 --attached-devices ATTACHED_DEVICES     Identifiers of attached interfaces, e.g. `['eth1', 'eth2']`. For bond interfaces those are the slaves. Only for bond and bridges interfaces.
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --attached-to ATTACHED_TO               Identifier of the interface to which this interface belongs, e.g. eth1. Only for virtual interfaces.
 --bond-options BOND_OPTIONS             Space separated options, e.g. miimon=100. Only for bond interfaces.
 --compute-attributes COMPUTE_ATTRS      Compute resource specific attributes
                                         Comma-separated list of key=value.
                                         JSON is acceptable and preferred way for complex parameters
 --domain DOMAIN_NAME                    Domain name
 --domain-id DOMAIN_ID                   Satellite domain ID of interface. Required for primary interfaces on managed hosts.
 --execution EXECUTION                   Should this interface be used for remote execution?
                                         One of true/false, yes/no, 1/0.
 --host HOST_NAME                        Host name
 --host-id HOST_ID                       ID or name of host
 --identifier IDENTIFIER                 Device identifier, e.g. eth0 or eth1.1
 --ip IP                                 IPv4 address of interface
 --ip6 IP6                               IPv6 address of interface
 --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
 --mac MAC                               MAC address of interface. Required for managed interfaces on bare metal.
 --managed MANAGED                       Should this interface be managed via DHCP and DNS capsule and should it be configured during provisioning?
                                         One of true/false, yes/no, 1/0.
 --mode MODE                             Bond mode of the interface, e.g. balance-rr. Only for bond interfaces.
                                         Possible value(s): 'balance-rr', 'active-backup', 'balance-xor', 'broadcast', '802.3ad', 'balance-tlb', 'balance-alb'
 --mtu MTU                               MTU, this attribute has precedence over the subnet MTU.
 --name NAME                             Interface's DNS 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
 --password PASSWORD                     Only for BMC interfaces.
 --primary                               Should this interface be used for constructing the FQDN of the host? Each managed hosts needs to have one primary interface
 --provider PROVIDER                     Interface provider, e.g. IPMI. Only for BMC interfaces.
                                         Possible value(s): 'IPMI', 'Redfish', 'SSH'
 --provision                             Should this interface be used for TFTP of PXELinux (or SSH for image-based hosts)? Each managed hosts needs to have one provision interface
 --subnet SUBNET_NAME                    Subnet name
 --subnet-id SUBNET_ID                   Satellite subnet ID of IPv4 interface
 --subnet6-id SUBNET6_ID                 Satellite subnet ID of IPv6 interface
 --tag TAG                               VLAN tag, this attribute has precedence over the subnet VLAN ID. Only for virtual interfaces.
 --type TYPE                             Interface type, e.g. bmc. Default is interface
                                         Possible value(s): 'interface', 'bmc', 'bond', 'bridge'
 --username USERNAME                     Only for BMC interfaces.
 --virtual VIRTUAL                       Alias or VLAN device
                                         One of true/false, yes/no, 1/0.
 -h, --help                              Print help

2.36.13.2. hammer 主机接口删除

删除主机的接口

Usage:
    hammer host interface <delete|destroy> [OPTIONS]

Options:
 --host HOST_NAME                        Host name
 --host-id HOST_ID                       ID or name of host
 --id ID                                 ID of interface
 --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
 --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
 -h, --help                              Print help

2.36.13.3. hammer 主机接口信息

显示主机的接口

Usage:
    hammer host interface <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
 --host HOST_NAME                        Host name
 --host-id HOST_ID                       ID or name of host
 --id ID                                 ID or name of interface
 --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
 --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
 -h, --help                              Print help

Predefined field sets:
  ----------------------|-----|---------|-----
  FIELDS                | ALL | DEFAULT | THIN
  ----------------------|-----|---------|-----
  Id                    | x   | x       | x
  Identifier            | x   | x       |
  Type                  | x   | x       |
  Mac address           | x   | x       |
  Ip address            | x   | x       |
  Dns name              | x   | x       |
  Subnet                | x   | x       |
  Domain                | x   | x       |
  Managed               | x   | x       |
  Primary               | x   | x       |
  Provision             | x   | x       |
  Virtual               | x   | x       |
  Tag                   | x   | x       |
  Attached to           | x   | x       |
  Bmc/username          | x   | x       |
  Bmc/provider          | x   | x       |
  Bond/mode             | x   | x       |
  Bond/attached devices | x   | x       |
  Bond/bond options     | x   | x       |
  Execution             | x   | x       |
  ----------------------|-----|---------|-----

2.36.13.4. hammer 主机接口列表

列出主机的所有接口

Usage:
    hammer host interface <list|index> [OPTIONS]

Options:
 --domain DOMAIN_NAME                    Domain name
 --domain-id DOMAIN_ID                   ID or name of domain
 --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
 --host HOST_NAME                        Host name
 --host-id HOST_ID                       ID or name of host
 --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
 --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
 --page PAGE                             Page number, starting at 1
 --per-page PER_PAGE                     Number of results per page to return, 'all' to return all results
 --subnet SUBNET_NAME                    Subnet name
 --subnet-id SUBNET_ID                   ID or name of subnet
 -h, --help                              Print help

Predefined field sets:
  ------------|-----|---------|-----
  FIELDS      | ALL | DEFAULT | THIN
  ------------|-----|---------|-----
  Id          | x   | x       | x
  Identifier  | x   | x       |
  Type        | x   | x       |
  Mac address | x   | x       |
  Ip address  | x   | x       |
  Dns name    | x   | x       |
  ------------|-----|---------|-----

2.36.13.5. hammer 主机接口更新

更新主机的接口

Usage:
    hammer host interface update [OPTIONS]

Options:
 --attached-devices ATTACHED_DEVICES     Identifiers of attached interfaces, e.g. `['eth1', 'eth2']`. For bond interfaces those are the slaves. Only for bond and bridges interfaces.
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --attached-to ATTACHED_TO               Identifier of the interface to which this interface belongs, e.g. eth1. Only for virtual interfaces.
 --bond-options BOND_OPTIONS             Space separated options, e.g. miimon=100. Only for bond interfaces.
 --compute-attributes COMPUTE_ATTRS      Compute resource specific attributes
                                         Comma-separated list of key=value.
                                         JSON is acceptable and preferred way for complex parameters
 --domain DOMAIN_NAME                    Domain name
 --domain-id DOMAIN_ID                   Satellite domain ID of interface. Required for primary interfaces on managed hosts.
 --execution EXECUTION                   Should this interface be used for remote execution?
                                         One of true/false, yes/no, 1/0.
 --host HOST_NAME                        Host name
 --host-id HOST_ID                       ID or name of host
 --id ID                                 ID of interface
 --identifier IDENTIFIER                 Device identifier, e.g. eth0 or eth1.1
 --ip IP                                 IPv4 address of interface
 --ip6 IP6                               IPv6 address of interface
 --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
 --mac MAC                               MAC address of interface. Required for managed interfaces on bare metal.
 --managed MANAGED                       Should this interface be managed via DHCP and DNS capsule and should it be configured during provisioning?
                                         One of true/false, yes/no, 1/0.
 --mode MODE                             Bond mode of the interface, e.g. balance-rr. Only for bond interfaces.
                                         Possible value(s): 'balance-rr', 'active-backup', 'balance-xor', 'broadcast', '802.3ad', 'balance-tlb', 'balance-alb'
 --mtu MTU                               MTU, this attribute has precedence over the subnet MTU.
 --name NAME                             Interface's DNS 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
 --password PASSWORD                     Only for BMC interfaces.
 --primary                               Should this interface be used for constructing the FQDN of the host? Each managed hosts needs to have one primary interface
 --provider PROVIDER                     Interface provider, e.g. IPMI. Only for BMC interfaces.
                                         Possible value(s): 'IPMI', 'Redfish', 'SSH'
 --provision                             Should this interface be used for TFTP of PXELinux (or SSH for image-based hosts)? Each managed hosts needs to have one provision interface
 --subnet SUBNET_NAME                    Subnet name
 --subnet-id SUBNET_ID                   Satellite subnet ID of IPv4 interface
 --subnet6-id SUBNET6_ID                 Satellite subnet ID of IPv6 interface
 --tag TAG                               VLAN tag, this attribute has precedence over the subnet VLAN ID. Only for virtual interfaces.
 --type TYPE                             Interface type, e.g. bmc. Default is interface
                                         Possible value(s): 'interface', 'bmc', 'bond', 'bridge'
 --username USERNAME                     Only for BMC interfaces.
 --virtual VIRTUAL                       Alias or VLAN device
                                         One of true/false, yes/no, 1/0.
 -h, --help                              Print help

2.36.14. hammer 主机列表

列出所有主机

Usage:
    hammer host <list|index> [OPTIONS]

Options:
 --environment ENVIRONMENT_NAME                Environment name (--environment is deprecated: Use --puppet-environment[-id] instead)
 --environment-id ENVIRONMENT_ID               (--environment-id is deprecated: Use --puppet-environment[-id] instead)
 --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
 --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
 --order ORDER                                 Sort field and order, eg. ‘id DESC’
 --organization ORGANIZATION_NAME              Set the current organization context for the request
 --organization-id ORGANIZATION_ID             ID of organization
 --organization-title ORGANIZATION_TITLE       Set the current organization context for the request
 --page PAGE                                   Page number, starting at 1
 --per-page PER_PAGE                           Number of results per page to return, 'all' to return all results
 --puppet-environment PUPPET_ENVIRONMENT_NAME  Puppet environment name
 --puppet-environment-id PUPPET_ENVIRONMENT_ID
 --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
  Operating system       | x   | x       |
  Host group             | x   | x       |
  Ip                     | x   | x       |
  Mac                    | x   | x       |
  Global status          | x   | x       |
  Organization           | x   |         |
  Location               | x   |         |
  Additional information | x   |         |
  Content view           | x   | x       |
  Lifecycle environment  | x   | x       |
  Security               | x   |         |
  Bugfix                 | x   |         |
  Enhancement            | x   |         |
  Trace status           | x   | 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.36.15. hammer 主机软件包

管理主机上的软件包

Usage:
    hammer host package [OPTIONS] SUBCOMMAND [ARG] ...

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

Subcommands:
 install                       Install packages remotely using katello-agent. NOTE: Katello-agent is deprecated and will be removed in a future release. Consider using remote execution instead.
 list, index                   List packages installed on the host
 remove                        Uninstall packages remotely using katello-agent. NOTE: Katello-agent is deprecated and will be removed in a future release. Consider using remote execution instead.
 upgrade                       Update packages remotely using katello-agent. NOTE: Katello-agent is deprecated and will be removed in a future release. Consider using remote execution instead.
 upgrade-all                   Update packages remotely using katello-agent. NOTE: Katello-agent is deprecated and will be removed in a future release. Consider using remote execution instead.

Options:
 -h, --help                    Print help

2.36.15.1. hammer 主机软件包安装

使用 katello-agent 远程安装软件包。注意: Katello-agent 已被弃用,并将在以后的发行版本中删除。考虑改为使用远程执行。

Usage:
    hammer host package install [OPTIONS]

Options:
 --async                       Do not wait for the task
 --host HOST_NAME              Host name
 --host-id HOST_ID             ID of the host
 --packages PACKAGES           List of package 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
 -h, --help                    Print help

2.36.15.2. hammer 主机软件包列表

列出主机上安装的软件包

Usage:
    hammer host package <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
 --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             ID of the host
 --order ORDER                 Sort field and order, eg. 'id DESC'
 --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
  -------|-----|--------
  Nvra   | x   | x
  -------|-----|--------

Search / Order fields:
  arch                string
  epoch               string
  name                string
  nvra                string
  nvrea               string
  release             string
  version             string

2.36.15.3. hammer 主机软件包删除

使用 katello-agent 远程卸载软件包。注意: Katello-agent 已被弃用,并将在以后的发行版本中删除。考虑改为使用远程执行。

Usage:
    hammer host package remove [OPTIONS]

Options:
 --async                       Do not wait for the task
 --host HOST_NAME              Host name
 --host-id HOST_ID             ID of the host
 --packages PACKAGES           List of package 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
 -h, --help                    Print help

2.36.15.4. hammer 主机软件包升级

使用 katello-agent 远程更新软件包。注意: Katello-agent 已被弃用,并将在以后的发行版本中删除。考虑改为使用远程执行。

Usage:
    hammer host package upgrade [OPTIONS]

Options:
 --async                       Do not wait for the task
 --host HOST_NAME              Host name
 --host-id HOST_ID             ID of the host
 --packages PACKAGES           List of packages 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
 -h, --help                    Print help

2.36.15.5. hammer 主机软件包升级-all

使用 katello-agent 远程更新软件包。注意: Katello-agent 已被弃用,并将在以后的发行版本中删除。考虑改为使用远程执行。

Usage:
    hammer host package upgrade-all [OPTIONS]

Options:
 --async                       Do not wait for the task
 --host HOST_NAME              Host name
 --host-id HOST_ID             ID of the host
 -h, --help                    Print help

2.36.16. hammer host package-group

管理主机上的软件包组

Usage:
    hammer host package-group [OPTIONS] SUBCOMMAND [ARG] ...

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

Subcommands:
 install                       Install packages remotely using katello-agent. NOTE: Katello-agent is deprecated and will be removed in a future release. Consider using remote execution instead.
 remove                        Uninstall packages remotely using katello-agent. NOTE: Katello-agent is deprecated and will be removed in a future release. Consider using remote execution instead.

Options:
 -h, --help                    Print help

2.36.16.1. hammer host package-group install

使用 katello-agent 远程安装软件包。注意: Katello-agent 已被弃用,并将在以后的发行版本中删除。考虑改为使用远程执行。

Usage:
    hammer host package-group install [OPTIONS]

Options:
 --async                       Do not wait for the task
 --groups GROUPS               List of package group names (Deprecated)
                               Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                               JSON is acceptable and preferred way for complex parameters
 --host HOST_NAME              Host name
 --host-id HOST_ID             ID of the host
 -h, --help                    Print help

2.36.16.2. hammer host package-group remove

使用 katello-agent 远程卸载软件包。注意: Katello-agent 已被弃用,并将在以后的发行版本中删除。考虑改为使用远程执行。

Usage:
    hammer host package-group remove [OPTIONS]

Options:
 --async                       Do not wait for the task
 --groups GROUPS               List of package group names (Deprecated)
                               Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                               JSON is acceptable and preferred way for complex parameters
 --host HOST_NAME              Host name
 --host-id HOST_ID             ID of the host
 -h, --help                    Print help

2.36.17. hammer 主机策略一致性

查看主机的策略 ENC

Usage:
    hammer host policies-enc [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                                 The identifier of the host
 --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                             Host 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
 -h, --help                              Print help

Predefined field sets:
  ------------------------|-----|--------
  FIELDS                  | ALL | DEFAULT
  ------------------------|-----|--------
  Id                      | x   | x
  Profile id              | x   | x
  Content path            | x   | x
  Content download path   | x   | x
  Tailoring path          | x   | x
  Tailoring download path | x   | x
  Day of month            | x   | x
  Hour                    | x   | x
  Minute                  | x   | x
  Month                   | x   | x
  Week                    | x   | x
  ------------------------|-----|--------

2.36.18. hammer host puppet-classes

列出所有 Puppet 类

Usage:
    hammer host puppet-classes [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
 --host HOST_NAME                  Host name
 --host-id HOST_ID                 ID of host
 --location-id LOCATION_ID         Set the current location context for the request
 --order ORDER                     Sort field and order, eg. ‘id DESC’
 --organization-id ORGANIZATION_ID Set the current organization context for the request
 --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
 -h, --help                        Print help

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

Search / Order fields:
  config_group        string
  environment         string
  host                string
  hostgroup           string
  key                 string
  location            string
  name                string
  organization        string

2.36.19. hammer 主机重新引导

重启主机

Usage:
    hammer host reboot [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                             Host 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
 -h, --help                              Print help

2.36.20. hammer host rebuild-config

为主机重建与编配相关的配置

Usage:
    hammer host rebuild-config [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                             Host name
 --only ONLY                             Limit rebuild steps, valid steps are DHCP, DNS, TFTP, Content_Host_Status, Refresh_Content_Host_Status
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --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
 -h, --help                              Print help

2.36.21. hammer 主机报告

列出所有报告

Usage:
    hammer host reports [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                                 Host 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                             Host name
 --order ORDER                           Sort field and order, eg. ‘id DESC’
 --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
 --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
 -h, --help                              Print help

Predefined field sets:
  -----------------|-----|---------|-----
  FIELDS           | ALL | DEFAULT | THIN
  -----------------|-----|---------|-----
  Id               | x   | x       | x
  Host             | x   | x       |
  Last report      | x   | x       |
  Origin           | x   | x       |
  Applied          | x   | x       |
  Restarted        | x   | x       |
  Failed           | x   | x       |
  Restart failures | x   | x       |
  Skipped          | x   | x       |
  Pending          | x   | x       |
  -----------------|-----|---------|-----

Search / Order fields:
  applied             integer
  environment         string
  eventful            Values: true, false
  failed              integer
  failed_restarts     integer
  host                string
  host_id             integer
  hostgroup           string
  hostgroup_fullname  string
  hostgroup_title     string
  last_report         datetime
  location            string
  log                 text
  organization        string
  origin              string
  pending             integer
  reported            datetime
  resource            text
  restarted           integer
  skipped             integer

2.36.22. hammer 主机重置

重置主机

Usage:
    hammer host reset [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                             Host 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
 -h, --help                              Print help

2.36.23. hammer 主机 sc-params

列出所有智能类参数

Usage:
    hammer host sc-params [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
 --host HOST_NAME                        Host name
 --host-id HOST_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
 --order ORDER                           Sort field and order, eg. ‘id DESC’
 --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
 --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
 --show-hidden SHOW_HIDDEN               Display hidden values
                                         One of true/false, yes/no, 1/0.
 -h, --help                              Print help

Predefined field sets:
  --------------|-----|--------
  FIELDS        | ALL | DEFAULT
  --------------|-----|--------
  Id            | x   | x
  Parameter     | x   | x
  Default value | x   | x
  Override      | x   | x
  Puppet class  | x   | x
  Class id      | x   | x
  --------------|-----|--------

Search / Order fields:
  avoid_duplicates    Values: true, false
  environment         string
  key                 string
  merge_default       Values: true, false
  merge_overrides     Values: true, false
  override            Values: true, false
  parameter           string
  puppetclass         string
  puppetclass_name    string

2.36.24. hammer 主机 set-parameter

为主机创建或附加参数

Usage:
    hammer host set-parameter [OPTIONS]

Options:
 --hidden-value HIDDEN_VALUE     Should the value be hidden
                                 One of true/false, yes/no, 1/0.
 --host HOST_NAME                Host name
 --host-id HOST_ID
 --name NAME                     Parameter name
 --parameter-type PARAMETER_TYPE Type of the parameter
                                 Possible value(s): 'string', 'boolean', 'integer', 'real', 'array', 'hash', 'yaml', 'json'
                                 Default: "string"
 --value VALUE                   Parameter value
 -h, --help                      Print help

2.36.25. hammer 主机启动

打开主机电源

Usage:
    hammer host start [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                             Host 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
 -h, --help                              Print help

2.36.26. hammer 主机状态

获取主机状态

Usage:
    hammer host status [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                             Host 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
 --type TYPE                             Status type, can be one of

                                         Global

                                         Configuration

                                         Build
                                         Possible value(s): 'HostStatus::Global', 'configuration', 'build'
 -h, --help                              Print help

2.36.27. hammer 主机停止

关闭主机

Usage:
    hammer host stop [OPTIONS]

Options:
 --force                                 Force turning off a host
 --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                             Host 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
 -h, --help                              Print help

2.36.28. hammer 主机订阅

管理主机上的订阅信息

Usage:
    hammer host subscription [OPTIONS] SUBCOMMAND [ARG] ...

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

Subcommands:
 attach                        Add a subscription to a host
 auto-attach                   Trigger an auto-attach of subscriptions
 content-override              Override product content defaults
 product-content               List associated products
 register                      Register a host with subscription and information
 remove
 unregister                    Unregister the host as a subscription consumer

Options:
 -h, --help                    Print help

2.36.28.1. hammer 主机订阅附加

为主机添加订阅

Usage:
    hammer host subscription attach [OPTIONS]

Options:
 --host HOST_NAME                  Host name
 --host-id HOST_ID                 Id of the host
 --quantity Quantity               Quantity of this subscriptions to add. Defaults to 1
 --subscription-id SUBSCRIPTION_ID ID of subscription
 -h, --help                        Print help

2.36.28.2. hammer 主机订阅自动附加

触发订阅的自动附加

Usage:
    hammer host subscription auto-attach [OPTIONS]

Options:
 --host HOST_NAME              Host name
 --host-id HOST_ID             Id of the host
 -h, --help                    Print help

2.36.28.3. hammer 主机订阅 content-override

覆盖产品内容默认设置

Usage:
    hammer host subscription content-override [OPTIONS]

Options:
 --content-label CONTENT_LABEL Label of the content
 --host HOST_NAME              Host name
 --host-id HOST_ID             Id of the content host
 --override-name OVERRIDE_NAME Override parameter key or name.
                               To enable or disable a repo select 'enabled'.
                               Default value: enabled
                               Default: "enabled"
 --remove                      Remove a content override
 --value VALUE                 Override value. Note for repo enablement you can use a boolean value
 -h, --help                    Print help

2.36.28.4. hammer 主机订阅产品-内容

列出相关产品

Usage:
    hammer host subscription product-content [OPTIONS]

Options:
 --content-access-mode-all CONTENT_ACCESS_MODE_ALL Get all content available, not just that provided by subscriptions
                                                   One of true/false, yes/no, 1/0.
 --content-access-mode-env CONTENT_ACCESS_MODE_ENV Limit content to just that available in the host's content view version
                                                   One of true/false, yes/no, 1/0.
 --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
 --host HOST_NAME                                  Host name
 --host-id HOST_ID                                 Id of the host
 -h, --help                                        Print help

Predefined field sets:
  -----------------|-----|---------|-----
  FIELDS           | ALL | DEFAULT | THIN
  -----------------|-----|---------|-----
  Id               | x   | x       | x
  Name             | x   | x       | x
  Type             | x   | x       |
  Url              | x   | x       |
  Gpg key          | x   | x       |
  Label            | x   | x       |
  Default enabled? | x   | x       |
  Override         | x   | x       |
  -----------------|-----|---------|-----

2.36.28.5. hammer 主机订阅注册

使用订阅和信息注册主机

Usage:
    hammer host subscription register [OPTIONS]

Options:
 --content-view CONTENT_VIEW_NAME                    Content view name to search by
 --content-view-id CONTENT_VIEW_ID                   Content View ID
 --environment ENVIRONMENT_NAME                      Lifecycle environment name to search by (--environment is deprecated: Use --lifecycle-environment instead)
 --environment-id ENVIRONMENT_ID                     (--environment-id is deprecated: Use --lifecycle-environment-id instead)
 --hypervisor-guest-uuids HYPERVISOR_GUEST_UUIDS     UUIDs of the virtual guests from the host's hypervisor
                                                     Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                                     JSON is acceptable and preferred way for complex parameters
 --lifecycle-environment LIFECYCLE_ENVIRONMENT_NAME  Lifecycle environment name to search by
 --lifecycle-environment-id LIFECYCLE_ENVIRONMENT_ID Lifecycle Environment ID
 --name NAME                                         Name of the host
 --organization ORGANIZATION_NAME                    Organization name to search by
 --organization-id ORGANIZATION_ID                   Organization ID to search by
 --organization-label ORGANIZATION_LABEL             Organization label to search by
 --release-version RELEASE_VERSION                   Release version of the content host
 --service-level SERVICE_LEVEL                       A service level for auto-healing process, e.g. SELF-SUPPORT
 --uuid UUID                                         UUID to use for registered host, random uuid is generated if not provided
 -h, --help                                          Print help

2.36.28.6. 已删除 hammer 主机订阅

Usage:
    hammer host subscription remove [OPTIONS]

Options:
 --host HOST_NAME                  Host name
 --host-id HOST_ID                 Id of the host
 --quantity Quantity               Remove the first instance of a subscription with matching id and quantity
 --subscription-id SUBSCRIPTION_ID ID of subscription
 -h, --help                        Print help

2.36.28.7. hammer 主机订阅未注册

将主机注册为订阅消费者

Usage:
    hammer host subscription unregister [OPTIONS]

Options:
 --host HOST_NAME              Host name
 --host-id HOST_ID             Id of the host
 -h, --help                    Print help

2.36.29. hammer 主机跟踪

列出主机上的追踪

Usage:
    hammer host traces [OPTIONS] SUBCOMMAND [ARG] ...

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

Subcommands:
 list                          List services that need restarting on the host
 resolve                       Resolve Traces

Options:
 -h, --help                    Print help

2.36.29.1. hammer 主机跟踪列表

列出主机上需要重启的服务

Usage:
    hammer host traces list [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
 --host HOST_NAME              Host name
 --host-id HOST_ID             ID of the host
 -h, --help                    Print help

Predefined field sets:
  ------------|-----|--------
  FIELDS      | ALL | DEFAULT
  ------------|-----|--------
  Trace id    | x   | x
  Application | x   | x
  Helper      | x   | x
  Type        | x   | x
  ------------|-----|--------

2.36.29.2. hammer 主机追踪解析

解析 Traces

Usage:
    hammer host traces resolve [OPTIONS]

Options:
 --async                       Do not wait for the task
 --host HOST_NAME              Host name
 --host-id HOST_ID             ID of the host
 --trace-ids TRACE_IDS         Array of Trace 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
 -h, --help                    Print help

2.36.30. hammer 主机更新

更新主机

Usage:
    hammer host update [OPTIONS]

Options:
 --ansible-role-ids ANSIBLE_ROLE_IDS                           IDs of associated ansible roles
                                                               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
 --architecture ARCHITECTURE_NAME                              Architecture name
 --architecture-id ARCHITECTURE_ID                             Required if host is managed and value is not inherited from host group
 --ask-root-password ASK_ROOT_PW                               One of true/false, yes/no, 1/0.
 --autoheal AUTOHEAL                                           Sets whether the Host will autoheal subscriptions upon checkin
                                                               One of true/false, yes/no, 1/0.
 --build BUILD                                                 One of true/false, yes/no, 1/0.
 --comment COMMENT                                             Additional information about this host
 --compute-attributes COMPUTE_ATTRS                            Compute resource attributes
                                                               Comma-separated list of key=value.
                                                               JSON is acceptable and preferred way for complex parameters
 --compute-profile COMPUTE_PROFILE_NAME                        Compute profile name
 --compute-profile-id COMPUTE_PROFILE_ID
 --compute-resource COMPUTE_RESOURCE_NAME                      Compute resource name
 --compute-resource-id COMPUTE_RESOURCE_ID                     Nil means host is bare metal
 --config-group-ids CONFIG_GROUP_IDS                           IDs of associated config groups
                                                               Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                                               JSON is acceptable and preferred way for complex parameters
 --config-groups CONFIG_GROUP_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
 --content-source CONTENT_SOURCE_NAME                          Content Source name
 --content-source-id CONTENT_SOURCE_ID
 --content-view CONTENT_VIEW_NAME                              Name to search by
 --content-view-id CONTENT_VIEW_ID
 --domain DOMAIN_NAME                                          Domain name
 --domain-id DOMAIN_ID                                         Required if host is managed and value is not inherited from host group
 --enabled ENABLED                                             Include this host within Satellite reporting
                                                               One of true/false, yes/no, 1/0.
 --environment ENVIRONMENT_NAME                                Environment name (--environment is deprecated: Use --puppet-environment[-id] instead)
 --environment-id ENVIRONMENT_ID                               (--environment-id is deprecated: Use --puppet-environment[-id] instead)
 --hostgroup HOSTGROUP_NAME                                    Hostgroup name
 --hostgroup-id HOSTGROUP_ID
 --hostgroup-title HOSTGROUP_TITLE                             Hostgroup title
 --hypervisor-guest-uuids HYPERVISOR_GUEST_UUIDS               List of hypervisor guest uuids
                                                               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
 --image IMAGE_NAME                                            Name to search by
 --image-id IMAGE_ID
 --installed-products-attributes INSTALLED_PRODUCTS_ATTRIBUTES List of products installed on the host
                                                               Comma separated list of values defined by a schema. See Option details section below.
                                                               JSON is acceptable and preferred way for complex parameters
 --interface INTERFACE                                         Interface parameters
                                                               Comma-separated list of key=value.
                                                               JSON is acceptable and preferred way for complex parameters
                                                               Can be specified multiple times.
 --ip IP                                                       Not required if using a subnet with DHCP Capsule
 --kickstart-repository REPOSITORY_NAME                        Kickstart repository name
 --kickstart-repository-id KICKSTART_REPOSITORY_ID             Repository Id associated with the kickstart repo used for provisioning
 --lifecycle-environment LIFECYCLE_ENVIRONMENT_NAME            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                                     Set the current location context for the request
 --location-title LOCATION_TITLE                               Set the current location context for the request
 --mac MAC                                                     Required for managed host that is bare metal, not required if it's a virtual machine
 --managed MANAGED                                             True/False flag whether a host is managed or unmanaged. Note: this value also determines whether several parameters are required or not
                                                               One of true/false, yes/no, 1/0.
 --medium MEDIUM_NAME                                          Medium name
 --medium-id MEDIUM_ID                                         Required if not imaged based provisioning and host is managed and value is not inherited from host group
 --model MODEL_NAME                                            Model name
 --model-id MODEL_ID
 --name NAME                                                   Host name
 --new-location NEW_LOCATION_NAME                              Use to update
 --new-location-id NEW_LOCATION_ID                             Use to update
 --new-location-title NEW_LOCATION_TITLE                       Use to update
 --new-name NEW_NAME
 --new-organization NEW_ORGANIZATION_NAME                      Use to update
 --new-organization-id NEW_ORGANIZATION_ID                     Use to update
 --new-organization-title NEW_ORGANIZATION_TITLE               Use to update
 --openscap-proxy-id OPENSCAP_PROXY_ID                         ID of OpenSCAP Capsule
 --operatingsystem OPERATINGSYSTEM_TITLE                       Operating system title
 --operatingsystem-id OPERATINGSYSTEM_ID                       Required if host is managed and value is not inherited from host group
 --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
 --overwrite OVERWRITE                                         One of true/false, yes/no, 1/0.
 --owner OWNER_LOGIN                                           Login of the owner
 --owner-id OWNER_ID                                           ID of the owner
 --owner-type OWNER_TYPE                                       Host's owner type
                                                               Possible value(s): 'User', 'Usergroup'
 --parameters PARAMS                                           Replaces with new host parameters
                                                               Comma-separated list of key=value.
                                                               JSON is acceptable and preferred way for complex parameters
 --partition-table PARTITION_TABLE_NAME                        Partition table name
 --partition-table-id PARTITION_TABLE_ID
 --product PRODUCT_NAME                                        Name to search by
 --product-id PRODUCT_ID                                       Product id as listed from a host's installed products,         this is not the same product id as the products api returns
 --progress-report-id PROGRESS_REPORT_ID                       UUID to track orchestration tasks status, GET /api/orchestration/:UUID/tasks
 --provision-method PROVISION_METHOD                           The method used to provision the host.
                                                               Possible value(s): 'build', 'image', 'bootdisk'
 --puppet-ca-proxy PUPPET_CA_PROXY_NAME
 --puppet-ca-proxy-id PUPPET_CA_PROXY_ID                       Puppet CA Capsule ID
 --puppet-class-ids PUPPET_CLASS_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
 --puppet-classes PUPPET_CLASS_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
 --puppet-environment PUPPET_ENVIRONMENT_NAME                  Puppet environment name
 --puppet-environment-id PUPPET_ENVIRONMENT_ID
 --puppet-proxy PUPPET_PROXY_NAME
 --puppet-proxy-id PUPPET_PROXY_ID                             Puppet Capsule ID
 --purpose-addons PURPOSE_ADDONS                               Sets the system add-ons
                                                               Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                                               JSON is acceptable and preferred way for complex parameters
 --purpose-role PURPOSE_ROLE                                   Sets the system purpose usage
 --purpose-usage PURPOSE_USAGE                                 Sets the system purpose usage
 --pxe-loader PXE_LOADER                                       DHCP filename option (Grub2/PXELinux by default)
                                                               Possible value(s): 'None', 'PXELinux BIOS', 'PXELinux UEFI', 'Grub UEFI', 'Grub2 BIOS', 'Grub2 ELF', 'Grub2 UEFI', 'Grub2 UEFI SecureBoot', 'Grub2 UEFI HTTP', 'Grub2 UEFI HTTPS', 'Grub2 UEFI HTTPS SecureBoot', 'iPXE Embedded', 'iPXE UEFI HTTP', 'iPXE Chain BIOS', 'iPXE Chain UEFI'
 --realm REALM_NAME                                            Name to search by
 --realm-id REALM_ID
 --release-version RELEASE_VERSION                             Release version for this Host to use (7Server, 7.1, etc)
 --root-password ROOT_PW                                       Required if host is managed and value is not inherited from host group or default password in settings
 --service-level SERVICE_LEVEL                                 Service level to be used for autoheal
 --subnet SUBNET_NAME                                          Subnet name
 --subnet-id SUBNET_ID                                         Required if host is managed and value is not inherited from host group
 --typed-parameters TYPED_PARAMS                               Replaces with new host parameters (with type support)
                                                               Comma separated list of values defined by a schema. See Option details section below.
                                                               JSON is acceptable and preferred way for complex parameters
 --volume VOLUME                                               Volume parameters
                                                               Comma-separated list of key=value.
                                                               JSON is acceptable and preferred way for complex parameters
                                                               Can be specified multiple times.
 -h, --help                                                    Print help

Option details:
  Following parameters accept format defined by its schema (bold are required; <> contain acceptable type; [] contain acceptable value):

  --typed-parameters  "name=<string>\,value=<string>\,parameter_type=[string|boolean|integer|real|array|hash|yaml|json]\,hidden_value=[true|false|1|0], ... "

  --installed-products-attributes  "product_id=<string>\,product_name=<string>\,arch=<string>\,version=<string>, ... "

Available keys for --interface:
  mac
  ip
  type                Possible values: interface, bmc, bond, bridge
  name
  subnet_id
  domain_id
  identifier
  managed             true/false
  primary             true/false, each managed hosts needs to have one primary interface.
  provision           true/false
  virtual             true/false

  For virtual=true:
    tag                 VLAN tag, this attribute has precedence over the subnet VLAN ID. Only for virtual interfaces.
    attached_to         Identifier of the interface to which this interface belongs, e.g. eth1.

  For type=bond:
    mode                Possible values: balance-rr, active-backup, balance-xor, broadcast, 802.3ad, balance-tlb, balance-alb
    attached_devices    Identifiers of slave interfaces, e.g. [eth1,eth2]
    bond_options

  For type=bmc:
    provider            always IPMI
    username
    password

Provider specific options:
  NOTE: Bold attributes are required.

  EC2:
    --volume:


    --interface:


    --compute-attributes:
      availability_zone
      flavor_id
      groups
      security_group_ids
      managed_ip

  GCE:
    --volume:
      size_gb             Volume size in GB, integer value

    --interface:


    --compute-attributes:
      machine_type
      network
      associate_external_ip

  Libvirt:
    --volume:
      pool_name                    One of available storage pools
      capacity                     String value, e.g. 10G
      allocation
      Initial allocation, e.g. 0G
      format_type                  Possible values: raw, qcow2

    --interface:
      compute_type                            Possible values: bridge, network
      compute_bridge                          Name of interface according to type
      compute_model                           Possible values: virtio, rtl8139, ne2k_pci, pcnet, e1000
      compute_network
      Libvirt instance network, e.g. default

    --compute-attributes:
      cpus                Number of CPUs
      memory              String, amount of memory, value in bytes
      cpu_mode            Possible values: default, host-model, host-passthrough
      start               Boolean (expressed as 0 or 1), whether to start the machine or not

  OpenStack:
    --volume:


    --interface:


    --compute-attributes:
      availability_zone
      boot_from_volume
      flavor_ref
      image_ref
      tenant_id
      security_groups
      network

  oVirt:
    --volume:
      size_gb             Volume size in GB, integer value
      storage_domain      ID or name of storage domain
      bootable            Boolean, set 1 for bootable, only one volume can be bootable
      preallocate         Boolean, set 1 to preallocate
      wipe_after_delete   Boolean, set 1 to wipe disk after delete
      interface           Disk interface name, must be ide, virto or virto_scsi

    --interface:
      compute_name          Compute name, e.g. eth0
      compute_network       Select one of available networks for a cluster, must be an ID or a name
      compute_interface     Interface type
      compute_vnic_profile  Vnic Profile

    --compute-attributes:
      cluster             ID or name of cluster to use
      template            Hardware profile to use
      cores               Integer value, number of cores
      sockets             Integer value, number of sockets
      memory              Amount of memory, integer value in bytes
      ha                  Boolean, set 1 to high availability
      display_type        Possible values: VNC, SPICE
      keyboard_layout     Possible values: ar, de-ch, es, fo, fr-ca, hu, ja, mk, no, pt-br, sv, da, en-gb, et, fr, fr-ch, is, lt, nl, pl, ru, th, de, en-us, fi, fr-be, hr, it, lv, nl-be, pt, sl, tr. Not usable if display type is SPICE.
      start               Boolean, set 1 to start the vm

  Rackspace:
    --volume:


    --interface:


    --compute-attributes:
      flavor_id

  VMware:
    --volume:
      name
      storage_pod         Storage Pod ID from VMware
      datastore           Datastore ID from VMware
      mode                persistent/independent_persistent/independent_nonpersistent
      size_gb             Integer number, volume size in GB
      thin                true/false
      eager_zero          true/false
      controller_key      Associated SCSI controller key

    --interface:
      compute_type        Type of the network adapter, for example one of:
                            VirtualVmxnet3
                            VirtualE1000
                          See documentation center for your version of vSphere to find more details about available adapter types:
                            https://www.vmware.com/support/pubs/
      compute_network     Network ID or Network Name from VMware

    --compute-attributes:
      cluster              Cluster ID from VMware
      corespersocket       Number of cores per socket (applicable to hardware versions < 10 only)
      cpus                 CPU count
      memory_mb            Integer number, amount of memory in MB
      path                 Path to folder
      resource_pool        Resource Pool ID from VMware
      firmware             automatic/bios/efi
      guest_id             Guest OS ID form VMware
      hardware_version     Hardware version ID from VMware
      memoryHotAddEnabled  Must be a 1 or 0, lets you add memory resources while the machine is on
      cpuHotAddEnabled     Must be a 1 or 0, lets you add CPU resources while the machine is on
      add_cdrom            Must be a 1 or 0, Add a CD-ROM drive to the virtual machine
      annotation           Annotation Notes
      scsi_controllers     List with SCSI controllers definitions
                             type - ID of the controller from VMware
                             key  - Key of the controller (e.g. 1000)
      start                Must be a 1 or 0, whether to start the machine or not

  AzureRM:
    --volume:
      disk_size_gb        Volume Size in GB (integer value)
      data_disk_caching   Data Disk Caching (None, ReadOnly, ReadWrite)

    --interface:
      compute_network     Select one of available Azure Subnets, must be an ID
      compute_public_ip   Public IP (None, Static, Dynamic)
      compute_private_ip  Static Private IP (expressed as true or false)

    --compute-attributes:
      resource_group      Existing Azure Resource Group of user
      vm_size             VM Size, eg. Standard_A0 etc.
      username            The Admin username
      password            The Admin password
      platform            OS type eg. Linux
      ssh_key_data        SSH key for passwordless authentication
      os_disk_caching     OS disk caching
      premium_os_disk     Premium OS Disk, Boolean as 0 or 1
      script_command      Custom Script Command
      script_uris         Comma seperated file URIs
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.