Feature #17021
closedno functionality within hammer to unlock a locked provisioning template
Description
I'm attempting to completely automate my foreman installation and configuration (including discovery plugin). The only issue i'm running into during the discovery configuration is that i want to update the locked template 'PXELinux global default'. I'm not seeing any method within 'hammer template update' to unlock a template that is by default in locked mode. (by default the PXELinux global default template is locked). Is there any way to unlock this template without using the GUI ?
Updated by Marek Hulán about 8 years ago
- Status changed from New to Need more information
It works fine for me, did you try using the update command?
hammer template update --locked true --id 170 Config template updated hammer template info --id 170 Id: 170 Name: Community Alterator default PXELinux Type: PXELinux Locked: yes Operating systems: hammer template update --locked false --id 170 Config template updated hammer template info --id 170 Id: 170 Name: Community Alterator default PXELinux Type: PXELinux Locked: no Operating systems:
Updated by Marcus Torres about 8 years ago
Marek Hulán wrote:
It works fine for me, did you try using the update command?
[...]
that worked ! sorry for the easy question. the template help output wasn't too clear on true|false being the switch. Thanks!
- hammer template update --help
Usage:
hammer template update [OPTIONS]
Options:
--audit-comment AUDIT_COMMENT
--file TEMPLATE Path to a file that contains the template
--id ID
--locked LOCKED Whether or not the template is locked for editing
--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.
--operatingsystems OPERATINGSYSTEM_TITLES Comma separated list of values.
--type TYPE Template type. Eg. snippet, script, provision
-h, --help print help
Updated by Marek Hulán about 8 years ago
- Status changed from Need more information to Assigned
- Assignee set to Marek Hulán
- Target version set to 1.4.2
Thanks for letting us know, it revealed a bug in boolean detection. The help with the fix should look like this
--locked LOCKED Whether or not the template is locked for editing One of true/false, yes/no, 1/0.
Updated by The Foreman Bot about 8 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/hammer-cli/pull/225 added
Updated by Marek Hulán about 8 years ago
- Target version changed from 1.4.2 to 1.4.4
Updated by Marek Hulán about 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 104addc3f9ab28cd8df1f16e6eaa0cfc28658387.
Updated by Tomáš Strachota over 7 years ago
- Translation missing: en.field_release set to 235