検索

2.43. hammer job-template

download PDF

ジョブテンプレートを管理します。

Usage:
    hammer job-template [OPTIONS] SUBCOMMAND [ARG] ...

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

Subcommands:
 create                        Create a job template
 delete, destroy               Delete a job template
 dump                          View job template content
 export                        Export a template including all metadata
 import                        Import a job template from ERB
 info, show                    Show job template details
 list, index                   List job templates
 update                        Update a job template

Options:
 -h, --help                    Print help

2.43.1. hammer job-template create

ジョブテンプレートを作成します。

Usage:
    hammer job-template create [OPTIONS]

Options:
 --audit-comment AUDIT_COMMENT
 --current-user CURRENT_USER               Whether the current user login should be used as the effective user
                                           One of true/false, yes/no, 1/0.
 --description DESCRIPTION
 --description-format DESCRIPTION_FORMAT   This template is used to generate the description. Input values can be used using the syntax %{package}. You may also include the job category and template name using %{job_category} and %{template_name}.
 --file TEMPLATE                           Path to a file that contains the template
 --job-category JOB_CATEGORY               Job category
 --location LOCATION_NAME                  Set the current location context for the request
 --location-id LOCATION_ID                 Set the current location context for the request
 --location-ids LOCATION_IDS               REPLACE locations with given 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
 --location-title LOCATION_TITLE           Set the current location context for the request
 --location-titles LOCATION_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
 --locations LOCATION_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
 --locked LOCKED                           Whether or not the template is locked for editing
                                           One of true/false, yes/no, 1/0.
 --name NAME                               Template 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-ids ORGANIZATION_IDS       REPLACE organizations with given 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
 --organization-title ORGANIZATION_TITLE   Set the current organization context for the request
 --organization-titles ORGANIZATION_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
 --organizations ORGANIZATION_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
 --overridable OVERRIDABLE                 Whether it should be allowed to override the effective user from the invocation form.
                                           One of true/false, yes/no, 1/0.
 --provider-type PROVIDER_TYPE             Provider type
                                           Possible value(s): 'SSH', 'Ansible'
 --snippet SNIPPET                         One of true/false, yes/no, 1/0.
 --value VALUE                             What user should be used to run the script (using sudo-like mechanisms)
 -h, --help                                Print help

2.43.2. hammer job-template delete

ジョブテンプレートを削除します。

Usage:
    hammer job-template <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.43.3. hammer job-template dump

ジョブテンプレートコンテンツを表示します。

Usage:
    hammer job-template dump [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
  ------

2.43.4. hammer job-template export

すべてのメターデータを含むテンプレートをエクスポートします。

Usage:
    hammer job-template export [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
  ------

2.43.5. hammer job-template import

ERB からジョブテンプレートをインポートします。

Usage:
    hammer job-template import [OPTIONS]

Options:
 --file TEMPLATE                         Path to a file that contains the template - must include ERB metadata
 --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
 --overwrite OVERWRITE                   Overwrite template if it already exists
                                         One of true/false, yes/no, 1/0.
 -h, --help                              Print help

2.43.6. hammer job-template info

ジョブテンプレートの詳細を表示します。

Usage:
    hammer job-template <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
  Job category   | x   | x       |
  Provider       | x   | x       |
  Type           | x   | x       |
  Description    | x   | x       |
  Inputs         | x   | x       |
  Locations/     | x   | x       |
  Organizations/ | x   | x       |
  ---------------|-----|---------|-----

2.43.7. hammer job-template list

ジョブテンプレートの一覧を表示します。

Usage:
    hammer job-template <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               Scope by locations
 --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       Scope by organizations
 --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
  Job category | x   | x       |
  Provider     | x   | x       |
  Type         | x   | x       |
  -------------|-----|---------|-----

2.43.8. hammer job-template update

ジョブテンプレートを更新します。

Usage:
    hammer job-template update [OPTIONS]

Options:
 --audit-comment AUDIT_COMMENT
 --current-user CURRENT_USER               Whether the current user login should be used as the effective user
                                           One of true/false, yes/no, 1/0.
 --description DESCRIPTION
 --description-format DESCRIPTION_FORMAT   This template is used to generate the description. Input values can be used using the syntax %{package}. You may also include the job category and template name using %{job_category} and %{template_name}.
 --file TEMPLATE                           Path to a file that contains the template
 --id ID
 --job-category JOB_CATEGORY               Job category
 --location LOCATION_NAME                  Set the current location context for the request
 --location-id LOCATION_ID                 Set the current location context for the request
 --location-ids LOCATION_IDS               REPLACE locations with given 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
 --location-title LOCATION_TITLE           Set the current location context for the request
 --location-titles LOCATION_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
 --locations LOCATION_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
 --locked LOCKED                           Whether or not the template is locked for editing
                                           One of true/false, yes/no, 1/0.
 --name NAME                               Name to search by
 --new-name NEW_NAME                       Template 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-ids ORGANIZATION_IDS       REPLACE organizations with given 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
 --organization-title ORGANIZATION_TITLE   Set the current organization context for the request
 --organization-titles ORGANIZATION_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
 --organizations ORGANIZATION_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
 --overridable OVERRIDABLE                 Whether it should be allowed to override the effective user from the invocation form.
                                           One of true/false, yes/no, 1/0.
 --provider-type PROVIDER_TYPE             Provider type
                                           Possible value(s): 'SSH', 'Ansible'
 --snippet SNIPPET                         One of true/false, yes/no, 1/0.
 --value VALUE                             What user should be used to run the script (using sudo-like mechanisms)
 -h, --help                                Print help
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

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

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

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

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

会社概要

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

© 2024 Red Hat, Inc.