Feature #3887
closedSupport adding classes to answers file, not just top-level modules
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
Updated by Marek Hulán about 11 years ago
I think it should be possible already today using mapping
Or is the problem with need of changing installer config file?
Updated by Dominic Cleal about 11 years ago
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?
Updated by Marek Hulán about 11 years ago
Well I'll have to look at this, it won't be simple few lines change I guess.
Updated by Dominic Cleal about 11 years ago
- Blocks Feature #3308: Installer support for Foreman plugins added
Updated by Marek Hulán about 11 years ago
- 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.
Updated by Dominic Cleal about 11 years ago
- Target version set to 1.9.2
- Translation missing: en.field_release set to 4
Updated by Marek Hulán about 11 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 07c4983f7436b1c3acffb9d06decf297c1a276eb.