Feature #3887
closed
Support adding classes to answers file, not just top-level modules
Added by Dominic Cleal about 11 years ago.
Updated about 5 years ago.
Description
For Foreman plugin support (https://github.com/theforeman/puppet-foreman/pull/132), we could do with support for non-top level classes (i.e. "foreman::plugin::hooks" rather than just "foreman") in kafo, so the answers file would contain:
foreman:
custom_repo: true
foreman::plugin::hooks: true
foreman::plugin::bootdisk:
someparam: "example"
And then to permit the user to enable/disable these classes in the same way that top-level classes can be, with --no-enable-foreman-plugin-hooks.
Currently this happens:
# foreman-installer
File not found /usr/share/foreman-installer/modules/foreman::plugin::hooks/manifests/init.pp, check you answer file
I think it should be possible already today using mapping
Or is the problem with need of changing installer config file?
Oh yes, I forgot about that, thanks. There are a couple of issues:
The manifest_name option doesn't work with classes that are three levels deep (e.g. foreman::plugin::hooks). If you set it to "plugin/hooks" then Puppet fails with "could not find hostclass foreman::plugin/hooks", and if you set it to "plugin::hooks" then kafo fails with "File not found /usr/share/foreman-installer/modules/foreman/manifests/plugin::hooks.pp, check you answer file".
It seems that parameters on these non-top-level classes aren't made available to the user, these classes just included. Can kafo parse these?
Well I'll have to look at this, it won't be simple few lines change I guess.
- Blocks Feature #3308: Installer support for Foreman plugins added
- Status changed from New to Ready For Testing
With https://github.com/theforeman/kafo/pull/60 it should be working if you set mapping like this:
:mapping:
:"foreman::plugin::templates":
:dir_name: foreman
:manifest_name: plugin/templates
and answer file like this
---
foreman:
custom_repo: true
foreman_proxy:
custom_repo: true
puppet:
server: true
foreman::plugin::templates: true
It supports any level of nesting.
- Assignee set to Marek Hulán
- Target version set to 1.9.2
- Translation missing: en.field_release set to 4
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Also available in: Atom
PDF