Using sub classes in forman?

Hi, I am new to foreman and puppet and i am trying to setup this module
https://forge.puppetlabs.com/netmanagers/fail2ban

I have set my jails_config to concat but i am having trouble setting
fail2ban:jail as it does not show up as a smart class parameter in foreman.
I have defined jail in manifests/init.pp and setup a hash valve but that
doesn't seem to work either.

Looking at the following example fail2ban:jail is defined outside of the
fail2ban class. Is there anyway to do this inside of foreman?

class { 'fail2ban':
jails_config => 'concat',}
fail2ban::jail { 'sshd':
port => '22',
logpath => '/var/log/secure',
maxretry => '2',}

Regards,
Jacob

That's a define rather than a class, and ENCs can't declare defines. This
comes up all the time on the mailing lists, so check out the page dedicated
to various patterns for solving it:

http://projects.theforeman.org/projects/foreman/wiki/Instantiate_Puppet_resources

Greg

ยทยทยท On 23 February 2016 at 10:42, Jacob van Walraven wrote:

Looking at the following example fail2ban:jail is defined outside of the
fail2ban class.