Use dhcp and foreman proxy classes

Hello,

is it possible to use the puppets "theforeman-dhcp" and "theforeman-proxy"
on the same agent? My goal is to install and configure my dhcp server via
"theforeman-dhcp" and install/configure foreman-proxy on the same agent.
The problem is only, that class dhcp is configured in both puppets. If i
deploy both puppets on the target system, I get an error in foreman, that
class is already defined. Do you have an idea how to solve this?

Thank you!

Regards:
Matyas

Disable management of the dhcp class in foreman_proxy. See

  • set foreman_proxy::dhcp_managed to false.
··· On 27/09/16 11:07, bardos.matyas@gmail.com wrote: > Hello, > > is it possible to use the puppets "theforeman-dhcp" and > "theforeman-proxy" on the same agent? My goal is to install and > configure my dhcp server via "theforeman-dhcp" and install/configure > foreman-proxy on the same agent. The problem is only, that class dhcp is > configured in both puppets. If i deploy both puppets on the target > system, I get an error in foreman, that class is already defined. Do you > have an idea how to solve this?


Dominic Cleal
dominic@cleal.org

Dear Dominic,

thank you for your help. I have two new questions. If I would do this, does
it mean, that after the modifications, I cannot manage my dhcp server via
foreman -> foreman-proxy anymore? And the other question, where do I must
to modify this file? On the foreman server? Where is the file located on an
ubuntu server, and the modification, do I need to deploy it to the
foreman-proxy, or everything will be done automatically? Sorry, I am new in
foreman.

Thank you!

  1. szeptember 27., kedd 12:22:57 UTC+2 időpontban Dominic Cleal a
    következőt írta:
··· > > On 27/09/16 11:07, bardos...@gmail.com wrote: > > Hello, > > > > is it possible to use the puppets "theforeman-dhcp" and > > "theforeman-proxy" on the same agent? My goal is to install and > > configure my dhcp server via "theforeman-dhcp" and install/configure > > foreman-proxy on the same agent. The problem is only, that class dhcp is > > configured in both puppets. If i deploy both puppets on the target > > system, I get an error in foreman, that class is already defined. Do you > > have an idea how to solve this? > > Disable management of the dhcp class in foreman_proxy. See > > https://github.com/theforeman/puppet-foreman_proxy/blob/master/manifests/config.pp#L20 > - set foreman_proxy::dhcp_managed to false. > > -- > Dominic Cleal > dom...@cleal.org >

> Dear Dominic,
>
> thank you for your help. I have two new questions. If I would do this,
> does it mean, that after the modifications, I cannot manage my dhcp
> server via foreman -> foreman-proxy anymore?

No, it just disables the foreman_proxy class including the dhcp class,
preventing the duplicate definition. You then add the dhcp class as you
did before, avoiding the duplicate.

> And the other question,
> where do I must to modify this file? On the foreman server? Where is the
> file located on an ubuntu server, and the modification, do I need to
> deploy it to the foreman-proxy, or everything will be done
> automatically? Sorry, I am new in foreman.

It's a parameter of the class, you don't need to edit the module. If you
are adding the class via Foreman, edit the class under Configure >
Puppet classes, then tick Override on the dhcp_manage parameter and set
the default value to false (or set it on the host's parameters tab after
ticking Override).

··· On 28/09/16 10:11, bardos.matyas@gmail.com wrote:


Dominic Cleal
dominic@cleal.org