Did you try this add it into you kickstart

echo "Configuring puppet"
cat > /etc/puppet/puppet.conf << EOF
<%= snippet 'puppet.conf' %>
EOF

# Setup puppet to run on system reboot
/sbin/chkconfig --level 345 puppet on

/usr/bin/puppet agent --config /etc/puppet/puppet.conf -o --tags 
no_such_tag <%= @host.puppetmaster.blank? ? '' : "--server 
#{@host.puppetmaster}" %> --no-daemonize
<% end -%>


Create a snippet of puppet.conf
%#
kind: snippet
name: puppet.conf
%>
<%
  if @host.param_true?('enable-puppetlabs-pc1-repo') && 
(@host.operatingsystem.family == 'Debian' || @host.operatingsystem.family 
== 'Redhat')
    var_dir = '/opt/puppetlabs/puppet/cache'
    log_dir = '/var/log/puppetlabs/puppet'
    run_dir = '/var/run/puppetlabs'
    ssl_dir = '/etc/puppetlabs/puppet/ssl'
  else
    if @host.operatingsystem.family == 'Freebsd'
      var_dir = '/var/puppet'
    else
      var_dir = '/var/lib/puppet'
    end
    log_dir = '/var/log/puppet'
    run_dir = '/var/run/puppet'
    ssl_dir = '\$vardir/ssl'
  end
%>
[main]
vardir = <%= var_dir %>
logdir = <%= log_dir %>
rundir = <%= run_dir %>
ssldir = <%= ssl_dir %>

[agent]
pluginsync      = true
report          = true
ignoreschedules = true
<%- if @host.puppet_ca_server.strip -%>
ca_server       = <%= @host.puppet_ca_server %>
<%- end -%>
certname        = <%= @host.certname %>
environment     = <%= @host.environment %>
server          = <%= @host.puppetmaster %>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to