Bug #1981
closedParameterized Classes: cannot set parameters from Host page
Description
http://theforeman.org/projects/foreman/wiki/Parameterized_class_support claims that there is UI for setting parameters for classes from the host edit page:
Editing Param from within a Host
It's also possible to update a host-specific override from the host itself. So you don't have to grant access to the Puppet Classes page to everyone. From a Host, click Edit, got to the Parameters tab, and you'll see the variable, the class-scope, and the current value. You can then override the value for that host:
In my foreman (foreman-1.0.1-7.el6.noarch), I see entries for smart vars attached to classes (e.g. icinga::monitored -> my_icinga_sensor) but not for parameters of parameterized classes (e.g. I've added the "foreman" class from https://github.com/theforeman/puppet-foreman to this host, but nothing changes here).
Files
Updated by Ohad Levy over 11 years ago
Did you select override for those params you are interested in overriding ?
Updated by David Schmitt over 11 years ago
Ah! Iff I override the parameter on the class (add a fqdn=X matcher at https://.../puppetclasses/foreman/edit) then I can edit the value on the host page (https://.../hosts/X/edit). From the documentation on the wiki ("It's also possible to update a host-specific override from the host itself.") I was under the impression that I can add a fqdn=X matcher without going to the Class page.
Updated by Ohad Levy over 11 years ago
- Status changed from New to Feedback
you dont need to add it upfront, all you need is:
- override enabled
- fqdn in the order
Updated by David Schmitt over 11 years ago
I've now tested this with a different parameter: fqdn is in the order and I've checked the override checkbox on the Smart Class Parameter screen, but it does not appear on the host's Parameter page.
Updated by Greg Sutcliffe over 11 years ago
Param class support isn't in 1.0.1, it's coming in 1.1. I'm not sure if smart vars should or should not be overridable, I'll have to check.
Updated by Ohad Levy over 11 years ago
@Greg Sutcliffe, I think the nightly rpm is 1.0.1xxx
Updated by David Schmitt over 11 years ago
Indeed, in the environment of this host the class had no parameters at all. I've deleted and re-imported the class and now it has parameters in all environments. Setting parameters to override now causes the parameter to be listed in the expected place on the host page and overriding in on the host level properly creates a Matcher on the Smart Class Parameter.
Thank you for your help.
Updated by Ohad Levy over 11 years ago
@David Davis, if you can't find a bug, I'm happy ;)
Updated by Greg Sutcliffe over 11 years ago
Ohad Levy wrote:
@Greg Sutcliffe, I think the nightly rpm is 1.0.1xxx
Bleah, confusing. Will take it up with Sam