Closed iwishiknewhowtocomputer closed 6 years ago
If you only included sendmail
in your hiera classes
, then only that class is used. sendmail::mc::feature
is a defined type which needs to be defined separately for each required feature. So you will have to add
sendmail::mc::feature { 'mailertable': }
somewhere in your manifests.
What you are trying to do in hiera is currently not possible. The general suggestion would be, to create a profile class (e.g. profile::sendmail
) and include all the necessary definitions in that class.
But I can see the benefit of including a couple of features in the main sendmail class especially if that would be the only reason to write a profile class. I could add a new parameter features
to the class that would take a hash of the features to add. In your case you would have to include
sendmail::features:
mailertable: {}
in hiera to make it work. mailertable
is the name of the feature to add (see above) and {}
is an empty hash of parameters if you do not need any (as above).
I have just uploaded version 1.3.0 of the sendmail module to the Puppet Forge. It contains the proposed features
parameter. You should be able to include the mailertable feature using the hiera code outlined above.
But please not that this will only include the feature in the configuration. It does not manage the mailertable file itself. You will have to use the sendmail::mailertable
class to manage the complete file or the sendmail::mailertable::entry
defined type to manage individual entries in the file.
Just updated to 1.3.0
and everything works awesomely now. Thanks for a pushing a fix like that!
Fixed in release 1.3.0
Either I'm not doing something correctly or understanding the module correctly but I am unable to get the
sendmail::mc::feature
to add a FEATURE to the sendmail.mc file. In my hierdata/hosts/sendmail.yaml file I'm adding:classes:
"sendmail::mc::feature": mailertable {bunch of other sendmail:: configs}
But when I run puppet agent on my host, it doesn't even look like it's running the mc::feature class. Everything else works perfectly fine but it's just this
sendmail::mc::feature
class that just isn't running. (Hopefully all that makes sense?)