Declare Define type resource in foreman


I’m running a puppetmaster with foreman as ENC, configuration of classes goes to hiera.
I can declare class on my host without any problem.
I have some module like who just have define type.
On a init.pp I was able to create a new user with the following setup :

create_resources(‘accounts::user’, hiera_hash(‘accounts::user’))

But I don’t know how to do this with foreman.

Any idea ?

After intense regarding, seems that the only solution I found is :

  • create roles and profiles,
  • setup any needed create_resources into profiles,
  • from foreman scan the puppet master, and link the host to the proper roles

What do you think ?
Does this seems right for you guys ?