I have two development environments, main and development and my puppet.conf looks like this: [main] logdir=/var/log/puppet vardir=/var/lib/puppet ssldir=/var/lib/puppet/ssl rundir=/var/run/puppet factpath=$vardir/lib/facter pluginsync=false templatedir=$confdir/templates prerun_command=/etc/puppet/etckeeper-commit-pre postrun_command=/etc/puppet/etckeeper-commit-post [development] modulepath = /etc/puppet/environments/development/modules manifests=/etc/puppet/environments/development/manifests/site.pp I have made nodes.pp for both environments. now when I execute the following on the client: puppetd --test --verbose --environment development it access the nodes.pp in the /etc/puppet/manifests rather than going to /etc/puppet/environments/development/manifests/nodes.pp In my site.pp stored at /etc/puppet/environments/development/manifests/ site.pp I have the following: import ''nodes.pp'' How should I make puppet access the correct nodes.pp??? -- 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.
newguy
2011-Jul-13 18:43 UTC
[Puppet Users] Re: wrong nodes.pp being accessed by the client
I got the solution as I realize that puppet server needs to have only one nodes.pp for every environment and as client with different environments connect puppet looks for their module paths and install the respective packages, all the node entries irrespective of the environment they are attached to goes in the /etc/puppet/manifests/ nodes.pp. Please correct me if I am wrong. On Jul 13, 11:18 am, newguy <aimanparv...@gmail.com> wrote:> I have two development environments, main and development and my > puppet.conf looks like this: > > [main] > logdir=/var/log/puppet > vardir=/var/lib/puppet > ssldir=/var/lib/puppet/ssl > rundir=/var/run/puppet > factpath=$vardir/lib/facter > pluginsync=false > templatedir=$confdir/templates > prerun_command=/etc/puppet/etckeeper-commit-pre > postrun_command=/etc/puppet/etckeeper-commit-post > > [development] > modulepath = /etc/puppet/environments/development/modules > manifests=/etc/puppet/environments/development/manifests/site.pp > > I have made nodes.pp for both environments. > > now when I execute the following on the client: > puppetd --test --verbose --environment development > it access the nodes.pp in the /etc/puppet/manifests rather than going > to /etc/puppet/environments/development/manifests/nodes.pp > > In my site.pp stored at /etc/puppet/environments/development/manifests/ > site.pp I have the following: > import ''nodes.pp'' > > How should I make puppet access the correct nodes.pp???-- 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.
Darrell Fuhriman
2011-Jul-13 19:42 UTC
Re: [Puppet Users] Re: wrong nodes.pp being accessed by the client
No, you''re right, at least as far as I''ve been able to tell – though I certainly may have overlooked something. The puppetmaster only gets the configs from one environment, so you''re stuck using that. There are other consequences as well, such as defined resources using the definition in the server''s environment. Some of this is design, and some is from bugs: http://projects.puppetlabs.com/issues/4409 It is, to my mind, a pretty serious deficiency – one makes safely testing significant changes much harder. It''s enough of a pain that I''ve considered running a separate puppet master just for serving the testing environment. d. On Jul 13, 2011, at 11:43, newguy wrote:> I got the solution as I realize that puppet server needs to have only > one nodes.pp for every environment and as client with different > environments connect puppet looks for their module paths and install > the respective packages, all the node entries irrespective of the > environment they are attached to goes in the /etc/puppet/manifests/ > nodes.pp. > > Please correct me if I am wrong. > > On Jul 13, 11:18 am, newguy <aimanparv...@gmail.com> wrote: >> I have two development environments, main and development and my >> puppet.conf looks like this: >> >> [main] >> logdir=/var/log/puppet >> vardir=/var/lib/puppet >> ssldir=/var/lib/puppet/ssl >> rundir=/var/run/puppet >> factpath=$vardir/lib/facter >> pluginsync=false >> templatedir=$confdir/templates >> prerun_command=/etc/puppet/etckeeper-commit-pre >> postrun_command=/etc/puppet/etckeeper-commit-post >> >> [development] >> modulepath = /etc/puppet/environments/development/modules >> manifests=/etc/puppet/environments/development/manifests/site.pp >> >> I have made nodes.pp for both environments. >> >> now when I execute the following on the client: >> puppetd --test --verbose --environment development >> it access the nodes.pp in the /etc/puppet/manifests rather than going >> to /etc/puppet/environments/development/manifests/nodes.pp >> >> In my site.pp stored at /etc/puppet/environments/development/manifests/ >> site.pp I have the following: >> import ''nodes.pp'' >> >> How should I make puppet access the correct nodes.pp??? > > -- > 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.-- 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.
Nan Liu
2011-Jul-14 01:31 UTC
Re: [Puppet Users] wrong nodes.pp being accessed by the client
On Wed, Jul 13, 2011 at 11:18 AM, newguy <aimanparvaiz@gmail.com> wrote:> I have two development environments, main and development and my > puppet.conf looks like this: > > > [main] > logdir=/var/log/puppet > vardir=/var/lib/puppet > ssldir=/var/lib/puppet/ssl > rundir=/var/run/puppet > factpath=$vardir/lib/facter > pluginsync=false > templatedir=$confdir/templates > prerun_command=/etc/puppet/etckeeper-commit-pre > postrun_command=/etc/puppet/etckeeper-commit-post > > [development] > modulepath = /etc/puppet/environments/development/modules > manifests=/etc/puppet/environments/development/manifests/site.pp > > I have made nodes.pp for both environments. > > now when I execute the following on the client: > puppetd --test --verbose --environment development > it access the nodes.pp in the /etc/puppet/manifests rather than going > to /etc/puppet/environments/development/manifests/nodes.pp > > In my site.pp stored at /etc/puppet/environments/development/manifests/ > site.pp I have the following: > import ''nodes.pp'' > > How should I make puppet access the correct nodes.pp???Try: [development] modulepath = /etc/puppet/environments/development/modules manifestdir = /etc/puppet/environments/development/manifests manifests=/etc/puppet/environments/development/manifests/site.pp Thanks, Nan -- 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.
PBWebGuy
2011-Jul-14 17:07 UTC
[Puppet Users] Re: wrong nodes.pp being accessed by the client
Also you should specify the environments that the master supports: [master] # Environments that are defined for this PuppetMaster environments=development,main HTH, John -- 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.