-
Notifications
You must be signed in to change notification settings - Fork 1k
Fixes #39550 - Add vendor_data template kind #11115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <%# | ||
| kind: vendor_data | ||
| name: VendorData default | ||
| model: ProvisioningTemplate | ||
| oses: | ||
| - AlmaLinux | ||
| - CentOS | ||
| - CentOS_Stream | ||
| - Fedora | ||
| - Rocky | ||
| - Debian | ||
| - Ubuntu | ||
| description: | | ||
| This template is served as vendor-data during image based provisioning alongside the user-data | ||
| template. It contains Foreman-specific configuration that is the responsibility of Foreman as | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This description does not reflect the content of the template. Right now there is only |
||
| the infrastructure vendor: notifying Foreman when the host is built. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
That's not true with the current content. |
||
| -%> | ||
| #cloud-config | ||
| runcmd: | ||
| - [ sh, -c, "echo $(date) ': hello cloud init foreman world!'" ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| class AddVendorDataTemplateKind < ActiveRecord::Migration[7.0] | ||
| def up | ||
| TemplateKind.unscoped.find_or_create_by(name: 'vendor_data') do |kind| | ||
| kind.description = TemplateKind.default_template_descriptions['vendor_data'] | ||
| end | ||
| end | ||
|
|
||
| def down | ||
| kind = TemplateKind.unscoped.find_by(name: 'vendor_data') | ||
| return unless kind | ||
|
|
||
| kind.os_default_templates.destroy_all | ||
| kind.provisioning_templates.destroy_all | ||
| kind.destroy | ||
| end | ||
| end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the benefit of adding a new kind that's (in my eyes) very similar to or almost the same as user data and cloud-init?