3.42. hammer job-template
管理作业模板
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
3.42.1. hammer job-template create
创建作业模板
Usage: hammer job-template create [OPTIONS] Options: --audit-comment VALUE --current-user BOOLEAN Whether the current user login should be used as the effective user --description VALUE --description-format VALUE 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 FILE Path to a file that contains the template --job-category VALUE Job category --location VALUE Set the current location context for the request --location-id NUMBER Set the current location context for the request --location-ids LIST REPLACE locations with given ids --location-title VALUE Set the current location context for the request --location-titles LIST --locations LIST --locked BOOLEAN Whether or not the template is locked for editing --name VALUE Template name --organization VALUE Set the current organization context for the request --organization-id NUMBER Set the current organization context for the request --organization-ids LIST REPLACE organizations with given ids. --organization-title VALUE Set the current organization context for the request --organization-titles LIST --organizations LIST --overridable BOOLEAN Whether it should be allowed to override the effective user from the invocation form. --provider-type ENUM Provider type Possible value(s): 'SSH', 'Ansible' --snippet BOOLEAN --value VALUE What user should be used to run the script (using sudo-like mechanisms) -h, --help Print help Option details: Here you can find option types and the value an option can accept: BOOLEAN One of true/false, yes/no, 1/0 DATETIME Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format ENUM Possible values are described in the option's description FILE Path to a file KEY_VALUE_LIST Comma-separated list of key=value. JSON is acceptable and preferred way for such parameters LIST Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for such parameters MULTIENUM Any combination of possible values described in the option's description NUMBER Numeric value. Integer SCHEMA Comma separated list of values defined by a schema. JSON is acceptable and preferred way for such parameters VALUE Value described in the option's description. Mostly simple string
3.42.2. hammer job-template delete
删除作业模板
Usage: hammer job-template <delete|destroy> [OPTIONS] Options: --id VALUE --location VALUE Set the current location context for the request --location-id NUMBER Set the current location context for the request --location-title VALUE Set the current location context for the request --name VALUE Name to search by --organization VALUE Set the current organization context for the request --organization-id NUMBER Set the current organization context for the request --organization-title VALUE Set the current organization context for the request -h, --help Print help Option details: Here you can find option types and the value an option can accept: BOOLEAN One of true/false, yes/no, 1/0 DATETIME Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format ENUM Possible values are described in the option's description FILE Path to a file KEY_VALUE_LIST Comma-separated list of key=value. JSON is acceptable and preferred way for such parameters LIST Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for such parameters MULTIENUM Any combination of possible values described in the option's description NUMBER Numeric value. Integer SCHEMA Comma separated list of values defined by a schema. JSON is acceptable and preferred way for such parameters VALUE Value described in the option's description. Mostly simple string
3.42.3. hammer job-template dump
查看作业模板内容
Usage: hammer job-template dump [OPTIONS] Options: --fields LIST Show specified fields or predefined field sets only. (See below) --id VALUE --location VALUE Set the current location context for the request --location-id NUMBER Set the current location context for the request --location-title VALUE Set the current location context for the request --name VALUE Name to search by --organization VALUE Set the current organization context for the request --organization-id NUMBER Set the current organization context for the request --organization-title VALUE Set the current organization context for the request -h, --help Print help Predefined field sets: ------ FIELDS ------ Option details: Here you can find option types and the value an option can accept: BOOLEAN One of true/false, yes/no, 1/0 DATETIME Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format ENUM Possible values are described in the option's description FILE Path to a file KEY_VALUE_LIST Comma-separated list of key=value. JSON is acceptable and preferred way for such parameters LIST Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for such parameters MULTIENUM Any combination of possible values described in the option's description NUMBER Numeric value. Integer SCHEMA Comma separated list of values defined by a schema. JSON is acceptable and preferred way for such parameters VALUE Value described in the option's description. Mostly simple string
3.42.4. hammer job-template 导出
导出模板,包括所有元数据
Usage: hammer job-template export [OPTIONS] Options: --fields LIST Show specified fields or predefined field sets only. (See below) --id VALUE --location VALUE Set the current location context for the request --location-id NUMBER Set the current location context for the request --location-title VALUE Set the current location context for the request --name VALUE Name to search by --organization VALUE Set the current organization context for the request --organization-id NUMBER Set the current organization context for the request --organization-title VALUE Set the current organization context for the request -h, --help Print help Predefined field sets: ------ FIELDS ------ Option details: Here you can find option types and the value an option can accept: BOOLEAN One of true/false, yes/no, 1/0 DATETIME Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format ENUM Possible values are described in the option's description FILE Path to a file KEY_VALUE_LIST Comma-separated list of key=value. JSON is acceptable and preferred way for such parameters LIST Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for such parameters MULTIENUM Any combination of possible values described in the option's description NUMBER Numeric value. Integer SCHEMA Comma separated list of values defined by a schema. JSON is acceptable and preferred way for such parameters VALUE Value described in the option's description. Mostly simple string
3.42.5. hammer job-template import
从 ERB 导入作业模板
Usage: hammer job-template import [OPTIONS] Options: --file FILE Path to a file that contains the template - must include ERB metadata --location VALUE Set the current location context for the request --location-id NUMBER Set the current location context for the request --location-title VALUE Set the current location context for the request --organization VALUE Set the current organization context for the request --organization-id NUMBER Set the current organization context for the request --organization-title VALUE Set the current organization context for the request --overwrite BOOLEAN Overwrite template if it already exists -h, --help Print help Option details: Here you can find option types and the value an option can accept: BOOLEAN One of true/false, yes/no, 1/0 DATETIME Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format ENUM Possible values are described in the option's description FILE Path to a file KEY_VALUE_LIST Comma-separated list of key=value. JSON is acceptable and preferred way for such parameters LIST Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for such parameters MULTIENUM Any combination of possible values described in the option's description NUMBER Numeric value. Integer SCHEMA Comma separated list of values defined by a schema. JSON is acceptable and preferred way for such parameters VALUE Value described in the option's description. Mostly simple string
3.42.6. hammer job-template info
显示作业模板详情
Usage: hammer job-template <info|show> [OPTIONS] Options: --fields LIST Show specified fields or predefined field sets only. (See below) --id VALUE --location VALUE Set the current location context for the request --location-id NUMBER Set the current location context for the request --location-title VALUE Set the current location context for the request --name VALUE Name to search by --organization VALUE Set the current organization context for the request --organization-id NUMBER Set the current organization context for the request --organization-title VALUE 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 | ---------------|-----|---------|----- Option details: Here you can find option types and the value an option can accept: BOOLEAN One of true/false, yes/no, 1/0 DATETIME Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format ENUM Possible values are described in the option's description FILE Path to a file KEY_VALUE_LIST Comma-separated list of key=value. JSON is acceptable and preferred way for such parameters LIST Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for such parameters MULTIENUM Any combination of possible values described in the option's description NUMBER Numeric value. Integer SCHEMA Comma separated list of values defined by a schema. JSON is acceptable and preferred way for such parameters VALUE Value described in the option's description. Mostly simple string
3.42.7. hammer job-template 列表
列出作业模板
Usage: hammer job-template <list|index> [OPTIONS] Options: --fields LIST Show specified fields or predefined field sets only. (See below) --location VALUE Set the current location context for the request --location-id NUMBER Scope by locations --location-title VALUE Set the current location context for the request --order VALUE Sort and order by a searchable field, e.g. '<field> DESC' --organization VALUE Set the current organization context for the request --organization-id NUMBER Scope by organizations --organization-title VALUE Set the current organization context for the request --page NUMBER Page number, starting at 1 --per-page VALUE Number of results per page to return, 'all' to return all results --search VALUE 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 | -------------|-----|---------|----- Option details: Here you can find option types and the value an option can accept: BOOLEAN One of true/false, yes/no, 1/0 DATETIME Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format ENUM Possible values are described in the option's description FILE Path to a file KEY_VALUE_LIST Comma-separated list of key=value. JSON is acceptable and preferred way for such parameters LIST Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for such parameters MULTIENUM Any combination of possible values described in the option's description NUMBER Numeric value. Integer SCHEMA Comma separated list of values defined by a schema. JSON is acceptable and preferred way for such parameters VALUE Value described in the option's description. Mostly simple string
3.42.8. hammer job-template 更新
更新作业模板
Usage: hammer job-template update [OPTIONS] Options: --audit-comment VALUE --current-user BOOLEAN Whether the current user login should be used as the effective user --description VALUE --description-format VALUE 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 FILE Path to a file that contains the template --id VALUE --job-category VALUE Job category --location VALUE Set the current location context for the request --location-id NUMBER Set the current location context for the request --location-ids LIST REPLACE locations with given ids --location-title VALUE Set the current location context for the request --location-titles LIST --locations LIST --locked BOOLEAN Whether or not the template is locked for editing --name VALUE Template name --new-name VALUE Template name --organization VALUE Set the current organization context for the request --organization-id NUMBER Set the current organization context for the request --organization-ids LIST REPLACE organizations with given ids. --organization-title VALUE Set the current organization context for the request --organization-titles LIST --organizations LIST --overridable BOOLEAN Whether it should be allowed to override the effective user from the invocation form. --provider-type ENUM Provider type Possible value(s): 'SSH', 'Ansible' --snippet BOOLEAN --value VALUE What user should be used to run the script (using sudo-like mechanisms) -h, --help Print help Option details: Here you can find option types and the value an option can accept: BOOLEAN One of true/false, yes/no, 1/0 DATETIME Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format ENUM Possible values are described in the option's description FILE Path to a file KEY_VALUE_LIST Comma-separated list of key=value. JSON is acceptable and preferred way for such parameters LIST Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for such parameters MULTIENUM Any combination of possible values described in the option's description NUMBER Numeric value. Integer SCHEMA Comma separated list of values defined by a schema. JSON is acceptable and preferred way for such parameters VALUE Value described in the option's description. Mostly simple string