2.84. hammer 模板
操作置备模板
Usage: hammer template [OPTIONS] SUBCOMMAND [ARG] ... Parameters: SUBCOMMAND Subcommand [ARG] ... Subcommand arguments Subcommands: add-operatingsystem Associate an operating system build-pxe-default Update the default PXE menu on all configured TFTP servers clone Clone a provision template combination Manage template combinations create Create a provisioning template delete, destroy Delete a provisioning template dump View provisioning template content info, show Show provisioning template details kinds List available provisioning template kinds list, index List provisioning templates remove-operatingsystem Disassociate an operating system update Update a provisioning template Options: -h, --help Print help
2.84.1. hammer 模板附加组件系统
关联操作系统
Usage: hammer template add-operatingsystem [OPTIONS] Options: --id ID --name NAME Name to search by --operatingsystem OPERATINGSYSTEM_TITLE Operating system title --operatingsystem-id OPERATINGSYSTEM_ID -h, --help Print help
2.84.2. hammer 模板 build-pxe-default
更新所有配置的 TFTP 服务器中的默认 PXE 菜单
Usage: hammer template build-pxe-default [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 -h, --help Print help
2.84.3. hammer 模板克隆
克隆置备模板
Usage: hammer template clone [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 --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-title ORGANIZATION_TITLE Set the current organization context for the request -h, --help Print help
2.84.4. hammer 模板组合
管理模板组合
Usage: hammer template combination [OPTIONS] SUBCOMMAND [ARG] ... Parameters: SUBCOMMAND Subcommand [ARG] ... Subcommand arguments Subcommands: create Add a template combination delete, destroy Delete a template combination info, show Show template combination list, index List template combination update Update template combination Options: -h, --help Print help
2.84.4.1. hammer 模板组合创建
添加模板组合
Usage: hammer template combination create [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) --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 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 --provisioning-template PROVISIONING_TEMPLATE_NAME Name to search by --provisioning-template-id PROVISIONING_TEMPLATE_ID ID of config template --puppet-environment PUPPET_ENVIRONMENT_NAME Puppet environment name --puppet-environment-id PUPPET_ENVIRONMENT_ID -h, --help Print help
2.84.4.2. hammer 模板组合删除
删除模板组合
Usage: hammer template combination <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 --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.84.4.3. hammer 模板组合信息
显示模板组合
Usage: hammer template combination <info|show> [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 --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 --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 --provisioning-template PROVISIONING_TEMPLATE_NAME Name to search by --provisioning-template-id PROVISIONING_TEMPLATE_ID ID of config template --puppet-environment PUPPET_ENVIRONMENT_NAME Puppet environment name --puppet-environment-id PUPPET_ENVIRONMENT_ID -h, --help Print help Predefined field sets: ---------------------------|-----|---------|----- FIELDS | ALL | DEFAULT | THIN ---------------------------|-----|---------|----- Id | x | x | x Provisioning template id | x | x | Provisioning template name | x | x | Hostgroup id | x | x | Hostgroup name | x | x | Environment id | x | x | Environment name | x | x | Locations/ | x | x | Organizations/ | x | x | Created at | x | x | Updated at | x | x | ---------------------------|-----|---------|-----
2.84.4.4. hammer 模板组合列表
列出模板组合
Usage: hammer template combination <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 --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 --provisioning-template PROVISIONING_TEMPLATE_NAME Name to search by --provisioning-template-id PROVISIONING_TEMPLATE_ID ID of config template -h, --help Print help Predefined field sets: ----------------------|-----|---------|----- FIELDS | ALL | DEFAULT | THIN ----------------------|-----|---------|----- Id | x | x | x Provisioning template | x | x | Hostgroup | x | x | Environment | x | x | ----------------------|-----|---------|-----
2.84.4.5. hammer 模板组合更新
更新模板组合
Usage: hammer template combination update [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) --hostgroup HOSTGROUP_NAME Hostgroup name --hostgroup-id HOSTGROUP_ID ID of host group --hostgroup-title HOSTGROUP_TITLE Hostgroup title --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 --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 --provisioning-template PROVISIONING_TEMPLATE_NAME Name to search by --provisioning-template-id PROVISIONING_TEMPLATE_ID ID of config template --puppet-environment PUPPET_ENVIRONMENT_NAME Puppet environment name --puppet-environment-id PUPPET_ENVIRONMENT_ID -h, --help Print help
2.84.5. hammer 模板创建
创建置备模板
Usage: hammer template create [OPTIONS] Options: --audit-comment AUDIT_COMMENT --description DESCRIPTION --file TEMPLATE Path to a file that contains the template --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 --operatingsystem-ids OPERATINGSYSTEM_IDS Array of operating system IDs to associate with the template Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --operatingsystems OPERATINGSYSTEM_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 --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 --type TYPE Template type. Eg. snippet, script, provision -h, --help Print help
2.84.6. hammer 模板删除
删除置备模板
Usage: hammer 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.84.7. hammer 模板转储
查看置备模板内容
Usage: hammer 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.84.8. hammer 模板信息
显示置备模板详情
Usage: hammer 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 Type | x | x | Description | x | x | Locked | x | x | Operating systems/ | x | x | Locations/ | x | x | Organizations/ | x | x | Template combinations/hostgroup name | x | x | Template combinations/environment name | x | x | ---------------------------------------|-----|---------|-----
2.84.9. hammer 模板类型
列出可用的置备模板类型
Usage: hammer template kinds [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 -h, --help Print help Predefined field sets: -------|-----|---------|----- FIELDS | ALL | DEFAULT | THIN -------|-----|---------|----- Name | x | x | x -------|-----|---------|-----
2.84.10. hammer 模板列表
列出置备模板
Usage: hammer 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 --operatingsystem OPERATINGSYSTEM_TITLE Operating system title --operatingsystem-id OPERATINGSYSTEM_ID ID of operating system --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 Type | x | x | -------|-----|---------|----- Search / Order fields: default_template Values: true, false environment string hostgroup string kind string location string location_id integer locked Values: true, false name string operatingsystem string organization string organization_id integer snippet Values: true, false template text vendor string
2.84.11. hammer 模板 remove-operatingsystem
解除操作系统关联
Usage: hammer template remove-operatingsystem [OPTIONS] Options: --id ID --name NAME Name to search by --operatingsystem OPERATINGSYSTEM_TITLE Operating system title --operatingsystem-id OPERATINGSYSTEM_ID -h, --help Print help
2.84.12. hammer 模板更新
更新置备模板
Usage: hammer template update [OPTIONS] Options: --audit-comment AUDIT_COMMENT --description DESCRIPTION --file TEMPLATE Path to a file that contains the template --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-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 --operatingsystem-ids OPERATINGSYSTEM_IDS Array of operating system IDs to associate with the template Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for complex parameters --operatingsystems OPERATINGSYSTEM_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 --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 --type TYPE Template type. Eg. snippet, script, provision -h, --help Print help