How to install puppet-agent in version 4

In Katello, puppet.conf - Provisioning Template there is a variable
"enable-puppetlabs-pc1-repo". If it goes true, it will install puppet 4,
but where can i switch this variable to be true?
We are providing repos over Katello.

Hi,

> In Katello, puppet.conf - Provisioning Template there is a variable
> "enable-puppetlabs-pc1-repo". If it goes true, it will install puppet 4, but
> where can i switch this variable to be true?
> We are providing repos over Katello.

You can set this variable to true at different level, in global variable if all your hosts have this variable set to true, or at Org/location hostgroup or directly in the host.
If you provide the puppet 4 repo via katello, you have to use the 'enable-puppet4' variable instead of 'enable-puppetlabs-pc1-repo'.
There is a little bug in the puppet.conf template because it set the good configuration path only if you enable 'enable-puppetlabs-pc1-repo' and not when you set 'enable-puppet4' (which only setup puppet4 and not the repos)
The fix is simple:

@@ -5,9 +5,9 @@
<%
os_family = @host.operatingsystem.family
os_name = @host.operatingsystem.name

  • if @host.param_true?('enable-puppetlabs-pc1-repo') && (os_family == 'Debian' || os_family == 'Redhat' || os_name == 'SLES')
  • if (@host.param_true?('enable-puppetlabs-pc1-repo') || @host.param_true?('enable-puppet4')) && (os_family == 'Debian' || os_family == 'Redhat' || os_name == 'SLES')
    var_dir = '/opt/puppetlabs/puppet/cache'
    log_dir = '/var/log/puppetlabs/puppet'
    run_dir = '/var/run/puppetlabs'
    ssl_dir = '/etc/puppetlabs/puppet/ssl'

I will provide the fix on the comunity_template repo for this.

Have a nice day.

Cheers.

··· ----- Le 20 Juil 17, à 14:09, foreman-users a écrit :


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to foreman-users+unsubscribe@googlegroups.com .
To post to this group, send email to foreman-users@googlegroups.com .
Visit this group at https://groups.google.com/group/foreman-users .
For more options, visit https://groups.google.com/d/optout .


Baptiste AGASSE
Lyra Network France, Senior GNU/Linux engineer
109 Rue de l’innovation, 31670 Labège - France
Phone: (+33)5.67.22.31.87
Fax: (+33)5.67.22.31.61
Website: http://www.lyra-network.com

Hey,

thank you for the hint. I will try this out.

··· Am Donnerstag, 20. Juli 2017 17:57:10 UTC+2 schrieb Baptiste Agasse: > > Hi, > > ----- Le 20 Juil 17, à 14:09, foreman-users > a écrit : > > In Katello, puppet.conf - Provisioning Template there is a variable > "enable-puppetlabs-pc1-repo". If it goes true, it will install puppet 4, > but where can i switch this variable to be true? > We are providing repos over Katello. > > > You can set this variable to true at different level, in global variable > if all your hosts have this variable set to true, or at Org/location > hostgroup or directly in the host. > If you provide the puppet 4 repo via katello, you have to use the > 'enable-puppet4' variable instead of 'enable-puppetlabs-pc1-repo'. > There is a little bug in the puppet.conf template because it set the good > configuration path only if you enable 'enable-puppetlabs-pc1-repo' and not > when you set ' enable-puppet4' (which only setup puppet4 and not the repos) > The fix is simple: > > @@ -5,9 +5,9 @@ > <% > os_family = @host.operatingsystem.family > os_name = @host.operatingsystem.name > > - if @host.param_true?('enable-puppetlabs-pc1-repo') && (os_family == > 'Debian' || os_family == 'Redhat' || os_name == 'SLES') > + if (@host.param_true?('enable-puppetlabs-pc1-repo') || > @host.param_true?('enable-puppet4')) && (os_family == 'Debian' || os_family > == 'Redhat' || os_name == 'SLES') > var_dir = '/opt/puppetlabs/puppet/cache' > log_dir = '/var/log/puppetlabs/puppet' > run_dir = '/var/run/puppetlabs' > ssl_dir = '/etc/puppetlabs/puppet/ssl' > > I will provide the fix on the comunity_template repo for this. > > Have a nice day. > > Cheers. > > > -- > You received this message because you are subscribed to the Google Groups > "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to foreman-user...@googlegroups.com . > To post to this group, send email to forema...@googlegroups.com > . > Visit this group at https://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout. > > > -- > Baptiste AGASSE > Lyra Network France, Senior GNU/Linux engineer > 109 Rue de l'innovation, 31670 Labège - France > Phone: (+33)5.67.22.31.87 > Fax: (+33)5.67.22.31.61 > Website: http://www.lyra-network.com >

It worked, thank you

··· Am Donnerstag, 20. Juli 2017 17:57:10 UTC+2 schrieb Baptiste Agasse: > > Hi, > > ----- Le 20 Juil 17, à 14:09, foreman-users > a écrit : > > In Katello, puppet.conf - Provisioning Template there is a variable > "enable-puppetlabs-pc1-repo". If it goes true, it will install puppet 4, > but where can i switch this variable to be true? > We are providing repos over Katello. > > > You can set this variable to true at different level, in global variable > if all your hosts have this variable set to true, or at Org/location > hostgroup or directly in the host. > If you provide the puppet 4 repo via katello, you have to use the > 'enable-puppet4' variable instead of 'enable-puppetlabs-pc1-repo'. > There is a little bug in the puppet.conf template because it set the good > configuration path only if you enable 'enable-puppetlabs-pc1-repo' and not > when you set ' enable-puppet4' (which only setup puppet4 and not the repos) > The fix is simple: > > @@ -5,9 +5,9 @@ > <% > os_family = @host.operatingsystem.family > os_name = @host.operatingsystem.name > > - if @host.param_true?('enable-puppetlabs-pc1-repo') && (os_family == > 'Debian' || os_family == 'Redhat' || os_name == 'SLES') > + if (@host.param_true?('enable-puppetlabs-pc1-repo') || > @host.param_true?('enable-puppet4')) && (os_family == 'Debian' || os_family > == 'Redhat' || os_name == 'SLES') > var_dir = '/opt/puppetlabs/puppet/cache' > log_dir = '/var/log/puppetlabs/puppet' > run_dir = '/var/run/puppetlabs' > ssl_dir = '/etc/puppetlabs/puppet/ssl' > > I will provide the fix on the comunity_template repo for this. > > Have a nice day. > > Cheers. > > > -- > You received this message because you are subscribed to the Google Groups > "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to foreman-user...@googlegroups.com . > To post to this group, send email to forema...@googlegroups.com > . > Visit this group at https://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout. > > > -- > Baptiste AGASSE > Lyra Network France, Senior GNU/Linux engineer > 109 Rue de l'innovation, 31670 Labège - France > Phone: (+33)5.67.22.31.87 > Fax: (+33)5.67.22.31.61 > Website: http://www.lyra-network.com >