hyzhang
2011-May-19 19:29 UTC
[Puppet Users] How to pass variables from got from kickstart to puppet
We are trying to make puppet to do the some of the kickstart part for CentOS installation. The kickstart will prompt for hostname, IP, etc, then install the puppet client to the client. From then on, puppet would take over. My question is, how can I pass the variable such as hostname, IP,etc gotten from kickstart to puppet so client can get them. I need to set up files such as /etc/sysconfig/network etc on client using the variables. Thanks. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Chris Phillips
2011-May-19 19:48 UTC
Re: [Puppet Users] How to pass variables from got from kickstart to puppet
On 19 May 2011 20:29, hyzhang <hyzhang@jcvi.org> wrote:> We are trying to make puppet to do the some of the kickstart part for > CentOS installation. The kickstart will prompt for hostname, IP, etc, > then install the puppet client to the client. From then on, puppet > would take over. > > My question is, how can I pass the variable such as hostname, IP,etc > gotten from kickstart to puppet so client can get them. I need to set > up files such as /etc/sysconfig/network etc on client using the > variables. > >Well none of this should go anywhere near puppet. Anaconda (not kickstart) asks for this data and those details are then written to the system config files appropriately. These files (e.g. /etc/sysconfig/network) are then used by facter in a totally normal way. The only thing I would think sits outside of this is the system hostname for certificate generation. Personally we build our systems through Cobbler which handles the hostname and other variables, and provides a templated kickstart which requires no interaction. by the time we run a puppet run in a %post (and configure authentication and all that fluffier stuff) the system is just about ready and waiting. From what you say, you''re in a situation that you shouldn''t be in in the first place. Cheers Chris -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Ohad Levy
2011-May-19 20:06 UTC
Re: [Puppet Users] How to pass variables from got from kickstart to puppet
On 2011 5 19 22:48, "Chris Phillips" <chris@untrepid.com> wrote:> > > On 19 May 2011 20:29, hyzhang <hyzhang@jcvi.org> wrote: >> >> We are trying to make puppet to do the some of the kickstart part for >> CentOS installation. The kickstart will prompt for hostname, IP, etc, >> then install the puppet client to the client. From then on, puppet >> would take over. >> >> My question is, how can I pass the variable such as hostname, IP,etc >> gotten from kickstart to puppet so client can get them. I need to set >> up files such as /etc/sysconfig/network etc on client using the >> variables. >> > > Well none of this should go anywhere near puppet. Anaconda (not kickstart)asks for this data and those details are then written to the system config files appropriately. These files (e.g. /etc/sysconfig/network) are then used by facter in a totally normal way. The only thing I would think sits outside of this is the system hostname for certificate generation.> > Personally we build our systems through Cobbler which handles the hostnameand other variables, and provides a templated kickstart which requires no interaction. by the time we run a puppet run in a %post (and configure authentication and all that fluffier stuff) the system is just about ready and waiting. From what you say, you''re in a situation that you shouldn''t be in in the first place.>Or you can use foreman which automates the whole thing. Btw: you can share vars between kickstart and puppet this way. Ohad> Cheers > > Chris > > -- > You received this message because you are subscribed to the Google Groups"Puppet Users" group.> To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email topuppet-users+unsubscribe@googlegroups.com.> For more options, visit this group athttp://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.