検索

2.4. hammer ansible

download PDF

foreman ansible を管理します。

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

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

Subcommands:
 roles                         Manage ansible roles
 variables                     Manage ansible variables

Options:
 -h, --help                    Print help

2.4.1. hammer ansible roles

Ansible ロールを管理します。

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

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

Subcommands:
 delete, destroy               Deletes Ansible role
 fetch                         Fetch Ansible roles available to be synced
 import                        DEPRECATED: Import Ansible roles
 info, show                    Show role
 list, index                   List Ansible roles
 obsolete                      DEPRECATED: Obsolete Ansible roles
 play-hostgroups               Runs all Ansible roles on hostgroups
 play-hosts                    Runs all Ansible roles on hosts
 sync                          Sync Ansible roles

Options:
 -h, --help                    Print help

2.4.1.1. hammer ansible roles delete

Ansible ロールを削除します。

Usage:
    hammer ansible roles <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                             Name to search by
 --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.4.1.2. hammer ansible roles fetch

同期可能な Ansible ロールを取得します。

Usage:
    hammer ansible roles fetch [OPTIONS]

Options:
 --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
 --proxy-id PROXY_ID                     Capsule to fetch from
 -h, --help                              Print help

2.4.1.3. hammer ansible roles import

非推奨: Ansible ロールをインポートします。

Usage:
    hammer ansible roles import [OPTIONS]

Options:
 --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
 --proxy-id PROXY_ID                     Capsule to import from
 --role-names ROLE_NAMES                 Ansible role names to be imported
                                         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.4.1.4. hammer ansible roles info

ロールを表示します。

Usage:
    hammer ansible roles <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                             Name to search by
 --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.4.1.5. hammer ansible roles list

Ansible ロールを一覧表示します。

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

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

Search / Order fields:
  host                string
  host_id             integer
  hostgroup           string
  hostgroup_id        integer
  id                  integer
  name                string
  updated_at          datetime

2.4.1.6. hammer ansible roles obsolete

非推奨: Ansible ロールを使用停止します。

Usage:
    hammer ansible roles obsolete [OPTIONS]

Options:
 --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
 --proxy-id PROXY_ID                     Capsule to import from
 -h, --help                              Print help

2.4.1.7. hammer ansible roles play-hostgroups

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

Usage:
    hammer ansible roles play-hostgroups [OPTIONS]

Options:
 --hostgroup-ids HOSTGROUP_IDS           IDs of hostgroups to play roles on
                                         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-titles HOSTGROUP_TITLES     Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --hostgroups HOSTGROUP_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
 --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.4.1.8. hammer ansible roles play-hosts

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

Usage:
    hammer ansible roles play-hosts [OPTIONS]

Options:
 --host-ids HOST_IDS                     IDs of hosts to play roles on
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --hosts HOST_NAMES                      Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --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.4.1.9. hammer ansible roles sync

Ansible ロールの同期

Usage:
    hammer ansible roles sync [OPTIONS]

Options:
 --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
 --proxy-id PROXY_ID                     Capsule to sync from
 --role-names ROLE_NAMES                 Ansible role names to be synced
                                         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.4.2. hammer ansible variables

Ansible 変数を管理します。

Usage:
    hammer ansible variables [OPTIONS] SUBCOMMAND [ARG] ...

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

Subcommands:
 add-matcher                   Create an override value for a specific ansible variable
 create                        Create Ansible variable
 delete, destroy               Deletes Ansible variable
 import                        DEPRECATED: Import Ansible variables. This will only import variables for already existing roles, it will not import any new roles
 info, show                    Show variable
 list, index                   List Ansible variables
 obsolete                      DEPRECATED: Obsolete Ansible variables. This will only obsolete variables for already existing roles, it will not delete any old roles
 remove-matcher                Destroy an override value
 update                        Updates Ansible variable

Options:
 -h, --help                    Print help

2.4.2.1. hammer ansible variables add-matcher

特定の Ansible 変数のオーバーライド値を作成します。

Usage:
    hammer ansible variables add-matcher [OPTIONS]

Options:
 --ansible-variable ANSIBLE_VARIABLE_NAME  Name to search by
 --ansible-variable-id ANSIBLE_VARIABLE_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
 --match MATCH                             Override match
 --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
 --value VALUE                             Override value, required if omit is false
 -h, --help                                Print help

2.4.2.2. hammer ansible variables create

Ansible 変数を作成します。

Usage:
    hammer ansible variables create [OPTIONS]

Options:
 --ansible-role ANSIBLE_ROLE_NAME            Name to search by
 --ansible-role-id ANSIBLE_ROLE_ID           Role ID
 --avoid-duplicates AVOID_DUPLICATES         Remove duplicate values (only array type)
                                             One of true/false, yes/no, 1/0.
 --default-value DEFAULT_VALUE               Default value of variable
 --description DESCRIPTION                   Description of variable
 --hidden-value HIDDEN_VALUE                 When enabled the parameter is hidden in the UI
                                             One of true/false, yes/no, 1/0.
 --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
 --merge-default MERGE_DEFAULT               Include default value when merging all matching values
                                             One of true/false, yes/no, 1/0.
 --merge-overrides MERGE_OVERRIDES           Merge all matching values (only array/hash type)
                                             One of true/false, yes/no, 1/0.
 --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
 --override OVERRIDE                         Whether to override variable or not
                                             One of true/false, yes/no, 1/0.
 --override-value-order OVERRIDE_VALUE_ORDER The order in which values are resolved
 --validator-rule VALIDATOR_RULE             Used to enforce certain values for the parameter values
 --validator-type VALIDATOR_TYPE             Types of validation values
                                             Possible value(s): 'regexp', 'list'
 --variable VARIABLE                         Name of variable
 --variable-type VARIABLE_TYPE               Types of variable values
                                             Possible value(s): 'string', 'boolean', 'integer', 'real', 'array', 'hash', 'yaml', 'json'
 -h, --help                                  Print help

2.4.2.3. hammer ansible variables delete

Ansible 変数を削除します。

Usage:
    hammer ansible variables <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                             Name to search by
 --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.4.2.4. hammer ansible variables import

非推奨: Ansible 変数をインポートします。既存のロールの変数のみをインポートし、新規ロールはインポートしません。

Usage:
    hammer ansible variables import [OPTIONS]

Options:
 --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
 --proxy-id PROXY_ID                     Capsule to import from
 -h, --help                              Print help

2.4.2.5. hammer ansible variables info

変数を表示します。

Usage:
    hammer ansible variables <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                             Name to search by
 --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
  Variable                            | x   | x
  Default value                       | x   | x
  Type                                | x   | x
  Role                                | x   | x
  Role id                             | x   | x
  Description                         | x   | x
  Hidden value?                       | x   | x
  Validator/type                      | x   | x
  Validator/rule                      | x   | x
  Override values/override            | x   | x
  Override values/merge overrides     | x   | x
  Override values/merge default value | x   | x
  Override values/avoid duplicates    | x   | x
  Override values/order               | x   | x
  Override values/values/id           | x   | x
  Override values/values/match        | x   | x
  Override values/values/value        | x   | x
  Created at                          | x   | x
  Updated at                          | x   | x
  ------------------------------------|-----|--------

2.4.2.6. hammer ansible variables list

Ansible 変数を一覧表示します。

Usage:
    hammer ansible variables <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
 --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
 -h, --help                              Print help

Predefined field sets:
  --------------|-----|--------
  FIELDS        | ALL | DEFAULT
  --------------|-----|--------
  Id            | x   | x
  Variable      | x   | x
  Default value | x   | x
  Type          | x   | x
  Role          | x   | x
  Role id       | x   | x
  --------------|-----|--------

Search / Order fields:
  ansible_role        string
  avoid_duplicates    Values: true, false
  imported            Values: true, false
  key                 string
  merge_default       Values: true, false
  merge_overrides     Values: true, false
  name                string
  override            Values: true, false
  parameter           string

2.4.2.7. hammer ansible variables obsolete

非推奨: 廃止された Ansible 変数です。既存のロールの変数のみを使用されないようにするだけで、古くなったロールを削除するわけではありません。

Usage:
    hammer ansible variables obsolete [OPTIONS]

Options:
 --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
 --proxy-id PROXY_ID                     Capsule to import from
 -h, --help                              Print help

2.4.2.8. hammer ansible variables remove-matcher

オーバーライド値を破棄します。

Usage:
    hammer ansible variables remove-matcher [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                             Name to search by
 --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.4.2.9. hammer ansible variables update

Ansible 変数を更新します。

Usage:
    hammer ansible variables update [OPTIONS]

Options:
 --ansible-role ANSIBLE_ROLE_NAME            Name to search by
 --ansible-role-id ANSIBLE_ROLE_ID           Role ID
 --avoid-duplicates AVOID_DUPLICATES         Remove duplicate values (only array type)
                                             One of true/false, yes/no, 1/0.
 --default-value DEFAULT_VALUE               Default value of variable
 --description DESCRIPTION                   Description of variable
 --hidden-value HIDDEN_VALUE                 When enabled the parameter is hidden in the UI
                                             One of true/false, yes/no, 1/0.
 --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
 --merge-default MERGE_DEFAULT               Include default value when merging all matching values
                                             One of true/false, yes/no, 1/0.
 --merge-overrides MERGE_OVERRIDES           Merge all matching values (only array/hash type)
                                             One of true/false, yes/no, 1/0.
 --name NAME                                 Name to search by
 --new-name NEW_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
 --override OVERRIDE                         Whether to override variable or not
                                             One of true/false, yes/no, 1/0.
 --override-value-order OVERRIDE_VALUE_ORDER The order in which values are resolved
                                             Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                             JSON is acceptable and preferred way for complex parameters
 --validator-rule VALIDATOR_RULE             Used to enforce certain values for the parameter values
 --validator-type VALIDATOR_TYPE             Types of validation values
                                             Possible value(s): 'regexp', 'list'
 --variable VARIABLE                         Name of variable
 --variable-type VARIABLE_TYPE               Types of variable values
                                             Possible value(s): 'string', 'boolean', 'integer', 'real', 'array', 'hash', 'yaml', 'json'
 -h, --help                                  Print help
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.