Skip to content
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

Add support for overriding provisioning template method for host group #13

Open
lucasm-iRonin opened this issue Jul 30, 2018 · 0 comments
Labels
enhancement New feature or request priority/low

Comments

@lucasm-iRonin
Copy link

Currently when template for hostgroup is rendered it queries the database directly - https://github.com/theforeman/foreman/blob/f715a7c98457c6f43a1f803a75ba4540372d8544/app/controllers/unattended_controller.rb#L43-L45 so we don't have the option to render the template from file without corresponding template in the database. One of the options to fix it would be to change:

template = ProvisioningTemplate.find_by_name(params['id'].to_s)
@host = Hostgroup.find_by_title(params['hostgroup'].to_s)

to:

@host = Hostgroup.find_by_title(params['hostgroup'].to_s)
template = @host.provisioning_template(params['id'].to_s)
@timogoebel timogoebel added enhancement New feature or request priority/low labels Jul 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority/low
Projects
None yet
Development

No branches or pull requests

2 participants