Roles and Profiles with Foreman

Hello all,

I'm struggling to work out the best way to implement roles and profiles
with Foreman + smart parameters (or something which achieves the same
goal). Has anyone worked this out yet?

Thanks!

I'm playing with assigning hosts to host groups and structuring the house groups like the roles in my roles module. In site.pp I say:

include join(split($::hostgroup,'/'),'::')

That also allows you to use

  • %{::hostgroup}

In your hiera hierarchy.

Anyone see any pitfalls?

Well, I really want to use Foreman to hold the data. My team finds it very
convenient, and it's very clear what each host is getting. With hiera, it
can sometimes be a bit of a problem with multiple levels of hierarchy. I
was looking at foreman-hiera, but apparently it doesn't work with api v2. I
also looked at the foreman_data_binding/foreman_param_lookup combo, but I
can't get it to work on my system. I installed foreman_param_lookup in my
foreman installation, but it won't list itself as a plugin. I install and
configure foreman_data_binding in puppet as well. The error I receive when
attempting a puppet run is: Error: Could not retrieve catalog from remote
server: Error 400 on SERVER: Could not autoload
puppet/indirector/data_binding/foreman: cannot load such file –
puppet/indirector/foreman

Does anyone know if there are any version incompatibilities with
foreman_data_binding/foreman_param_lookup? I'm currently on puppet 3.2.3
and foreman 1.5.2.

> Well, I really want to use Foreman to hold the data. My team finds it
> very convenient, and it's very clear what each host is getting. With
> hiera, it can sometimes be a bit of a problem with multiple levels of
> hierarchy. I was looking at foreman-hiera, but apparently it doesn't
> work with api v2. I also looked at the
> foreman_data_binding/foreman_param_lookup combo, but I can't get it to
> work on my system. I installed foreman_param_lookup in my foreman
> installation, but it won't list itself as a plugin.

Yeah, it pre-dates this registration mechanism. Hopefully it's loaded
though.

> I install and
> configure foreman_data_binding in puppet as well. The error I receive
> when attempting a puppet run is: Error: Could not retrieve catalog from
> remote server: Error 400 on SERVER: Could not autoload
> puppet/indirector/data_binding/foreman: cannot load such file –
> puppet/indirector/foreman

You might want to try running the puppet agent on the master so the
data binding files are pluginsync'd to /var/lib/puppet/lib and then
restart the Puppet master. Automatically loading these files is a bit
unreliable.

> Does anyone know if there are any version incompatibilities with
> foreman_data_binding/foreman_param_lookup? I'm currently on puppet 3.2.3
> and foreman 1.5.2.

Hopefully it still works, but I've not worked on it for quite a long time.

··· On 20/10/14 18:38, Alyssa wrote:


Dominic Cleal
Red Hat Engineering