metalcloud-cli os-template create
Create a new OS template from JSON configuration
Synopsis
Section titled “Synopsis”Create a new OS template from JSON configuration.
This command creates a new OS template by reading configuration from a file or from standard input. The configuration should include both the template definition and any associated assets.
Required flags: —config-source Source of the template configuration (required) Can be ‘pipe’ to read from stdin, or path to a JSON file
The JSON configuration should follow the structure shown by the ‘example-create’ command, including template definition and optional template assets.
Examples:
Create template from file
Section titled “Create template from file”metalcloud-cli os-template create —config-source template.json
Create template from stdin
Section titled “Create template from stdin”cat template.json | metalcloud-cli os-template create —config-source pipe
Generate example and create template
Section titled “Generate example and create template”metalcloud-cli os-template example-create > template.json
Edit template.json with your values
Section titled “Edit template.json with your values”metalcloud-cli os-template create —config-source template.json
metalcloud-cli os-template create [flags]Options
Section titled “Options” --config-source string Source of the new OS template configuration. Can be 'pipe' or path to a JSON file. -h, --help help for createOptions inherited from parent commands
Section titled “Options inherited from parent commands” -k, --api_key string MetalCloud API key -c, --config string Config file path -d, --debug Set to enable debug logging -e, --endpoint string MetalCloud API endpoint -f, --format string Output format. Supported values are 'text','csv','md','json','yaml'. (default "text") -i, --insecure_skip_verify Set to allow insecure transport -l, --log_file string Log file path -v, --verbosity string Log level verbosity (default "INFO")SEE ALSO
Section titled “SEE ALSO”- metalcloud-cli os-template - Manage OS templates for server deployments