Hi all, My facts work during testing, but not on deployment. Any help would be greatly appreciated. Fact in modules/ldap/lib/puppet/facter/nss_ldap.rb: fact_name = ''nss_ldap'' Facter.add(fact_name) do setcode do auth_settings = %x{/usr/share/authconfig/authconfig.py --test} auth_settings = auth_settings.split(/\n/) # The line of output we are looking for line = auth_settings.collect { |v| v if v =~ /#{fact_name}/ }.compact[0] # The setting that the line is set to . . . line.scan(/\s+is\s+(\w*)/)[0][0] end # of setcode end # of Facter.add for testing, I have a call to a template in my init.pp: file { ''/tmp/ldap_info.txt'': content => template(''ldap/ldap_info.erb''); } # file And the template says: nss_ldap <%= nss_ldap %> pam_ldap <%= pam_ldap %> pam_oddjob_mkhomedir <%= pam_oddjob_mkhomedir %> My node fails, however, with the error: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to parse template ldap/ldap_info.erb: Could not find value for ''nss_ldap'' at /etc/puppetlabs/puppet/modules/ldap/manifests/init.pp:23 on node gmatzpupnode Any thoughts would be greatly appreciated, especially suggestions on how to go about debugging the issue. . . Thanks a lot, Guy -- 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.
Craig White
2011-Jul-29 15:29 UTC
Re: [Puppet Users] Another Custom Fact deployment problem
on clients - agent.conf pluginsync = true Craig On Jul 29, 2011, at 8:06 AM, Guy Matz wrote:> Hi all, > > My facts work during testing, but not on deployment. Any help would be greatly appreciated. > > > Fact in modules/ldap/lib/puppet/facter/nss_ldap.rb: > > fact_name = ''nss_ldap'' > > Facter.add(fact_name) do > > setcode do > > auth_settings = %x{/usr/share/authconfig/authconfig.py --test} > > auth_settings = auth_settings.split(/\n/) > > > # The line of output we are looking for > > line = auth_settings.collect { |v| v if v =~ /#{fact_name}/ }.compact[0] > > # The setting that the line is set to . . . > > line.scan(/\s+is\s+(\w*)/)[0][0] > > end # of setcode > > end # of Facter.add > > > > for testing, I have a call to a template in my init.pp: > > file { > > ''/tmp/ldap_info.txt'': > > content => template(''ldap/ldap_info.erb''); > > } # file > > > And the template says: > > > nss_ldap <%= nss_ldap %> > > pam_ldap <%= pam_ldap %> > > pam_oddjob_mkhomedir <%= pam_oddjob_mkhomedir %> > > > My node fails, however, with the error: > > err: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to parse template ldap/ldap_info.erb: Could not find value for ''nss_ldap'' at /etc/puppetlabs/puppet/modules/ldap/manifests/init.pp:23 on node gmatzpupnode > > > Any thoughts would be greatly appreciated, especially suggestions on how to go about debugging the issue. . . > > > Thanks a lot, > > Guy > > > -- > 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.-- Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.white@ttiltd.com 1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com Need help communicating between generations at work to achieve your desired success? Let us help! -- 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.
yeah, I got that set . . . yeah, I should have mentioned that the facts do get downloaded on the client to $vardir/lib/puppet/facter . . . but still the facts are not available! thanks a lot! guy On Fri, Jul 29, 2011 at 11:29 AM, Craig White <craig.white@ttiltd.com>wrote:> on clients - agent.conf > > pluginsync = true > > Craig > > On Jul 29, 2011, at 8:06 AM, Guy Matz wrote: > > > Hi all, > > > > My facts work during testing, but not on deployment. Any help would be > greatly appreciated. > > > > > > Fact in modules/ldap/lib/puppet/facter/nss_ldap.rb: > > > > fact_name = ''nss_ldap'' > > > > Facter.add(fact_name) do > > > > setcode do > > > > auth_settings = %x{/usr/share/authconfig/authconfig.py --test} > > > > auth_settings = auth_settings.split(/\n/) > > > > > > # The line of output we are looking for > > > > line = auth_settings.collect { |v| v if v =~ /#{fact_name}/ > }.compact[0] > > > > # The setting that the line is set to . . . > > > > line.scan(/\s+is\s+(\w*)/)[0][0] > > > > end # of setcode > > > > end # of Facter.add > > > > > > > > for testing, I have a call to a template in my init.pp: > > > > file { > > > > ''/tmp/ldap_info.txt'': > > > > content => template(''ldap/ldap_info.erb''); > > > > } # file > > > > > > And the template says: > > > > > > nss_ldap <%= nss_ldap %> > > > > pam_ldap <%= pam_ldap %> > > > > pam_oddjob_mkhomedir <%= pam_oddjob_mkhomedir %> > > > > > > My node fails, however, with the error: > > > > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > Failed to parse template ldap/ldap_info.erb: Could not find value for > ''nss_ldap'' at /etc/puppetlabs/puppet/modules/ldap/manifests/init.pp:23 on > node gmatzpupnode > > > > > > Any thoughts would be greatly appreciated, especially suggestions on how > to go about debugging the issue. . . > > > > > > Thanks a lot, > > > > Guy > > > > > > -- > > 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. > > -- > Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.white@ttiltd.com > 1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com > > Need help communicating between generations at work to achieve your desired > success? Let us help! > > -- > 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.
On Fri, Jul 29, 2011 at 11:38 AM, Guy Matz <gmatz@matz.org> wrote:> yeah, I got that set . . . yeah, I should have mentioned that the facts do > get downloaded on the client to $vardir/lib/puppet/facter . . . but still > the facts are not available!If you run facter -p on the client side does it load the custom fact? If it''s loading the fact successfully on the agent, is this fact uploaded to the masters $vardir/yaml/facts directory? 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.
No!!! facter -p does *not* show my facts . . . what does that mean!? thank *you*! On Fri, Jul 29, 2011 at 11:42 AM, Nan Liu <nan@puppetlabs.com> wrote:> On Fri, Jul 29, 2011 at 11:38 AM, Guy Matz <gmatz@matz.org> wrote: > > yeah, I got that set . . . yeah, I should have mentioned that the facts > do > > get downloaded on the client to $vardir/lib/puppet/facter . . . but > still > > the facts are not available! > > If you run facter -p on the client side does it load the custom fact? > If it''s loading the fact successfully on the agent, is this fact > uploaded to the masters $vardir/yaml/facts directory? > > 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. > >-- 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.
hmm . . . my custom facts are in /var/opt/lib/pe-puppet/lib/puppet/facter, but if I put them in /var/opt/lib/pe-puppet/lib/facter they *do* show up in facter -p . . . does that mean I am "packaging" my facts incorrectly on the server? Or is my client misconfigured? puppet.conf on my client is: [main] vardir = /var/opt/lib/pe-puppet logdir = /var/log/pe-puppet rundir = /var/run/pe-puppet modulepath = /etc/puppetlabs/puppet/modules user = pe-puppet group = pe-puppet [agent] certname = gmatzpupnode.mserv.local server = gmatzpupmaster.mserv.local report = true classfile = $vardir/classes.txt localconfig = $vardir/localconfig graph = true pluginsync = true Again, the fact is defined on the server in modules/ldap/lib/puppet/facter . . . Thanks again On Fri, Jul 29, 2011 at 11:48 AM, Guy Matz <gmatz@matz.org> wrote:> No!!! facter -p does *not* show my facts . . . what does that mean!? > > thank *you*! > > > On Fri, Jul 29, 2011 at 11:42 AM, Nan Liu <nan@puppetlabs.com> wrote: > >> On Fri, Jul 29, 2011 at 11:38 AM, Guy Matz <gmatz@matz.org> wrote: >> > yeah, I got that set . . . yeah, I should have mentioned that the facts >> do >> > get downloaded on the client to $vardir/lib/puppet/facter . . . but >> still >> > the facts are not available! >> >> If you run facter -p on the client side does it load the custom fact? >> If it''s loading the fact successfully on the agent, is this fact >> uploaded to the masters $vardir/yaml/facts directory? >> >> 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. >> >> >-- 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, thanks for the hint! If I put the facts in module/lib/facter they work on the client . . . I used puppet-module to create the module and followed the directions for creating a custom fact, but I guess they need to go in module/lib/facter, not module/lib/puppet/facter . . . thanks a lot everyone! On Fri, Jul 29, 2011 at 11:54 AM, Guy Matz <gmatz@matz.org> wrote:> hmm . . . my custom facts are in > /var/opt/lib/pe-puppet/lib/puppet/facter, but if I put them in > /var/opt/lib/pe-puppet/lib/facter they *do* show up in facter -p . . . does > that mean I am "packaging" my facts incorrectly on the server? Or is my > client misconfigured? > puppet.conf on my client is: > [main] > vardir = /var/opt/lib/pe-puppet > logdir = /var/log/pe-puppet > rundir = /var/run/pe-puppet > modulepath = /etc/puppetlabs/puppet/modules > user = pe-puppet > group = pe-puppet > > [agent] > certname = gmatzpupnode.mserv.local > server = gmatzpupmaster.mserv.local > report = true > classfile = $vardir/classes.txt > localconfig = $vardir/localconfig > graph = true > pluginsync = true > > > Again, the fact is defined on the server in modules/ldap/lib/puppet/facter > . . . > > Thanks again > > > > On Fri, Jul 29, 2011 at 11:48 AM, Guy Matz <gmatz@matz.org> wrote: > >> No!!! facter -p does *not* show my facts . . . what does that mean!? >> >> thank *you*! >> >> >> On Fri, Jul 29, 2011 at 11:42 AM, Nan Liu <nan@puppetlabs.com> wrote: >> >>> On Fri, Jul 29, 2011 at 11:38 AM, Guy Matz <gmatz@matz.org> wrote: >>> > yeah, I got that set . . . yeah, I should have mentioned that the >>> facts do >>> > get downloaded on the client to $vardir/lib/puppet/facter . . . but >>> still >>> > the facts are not available! >>> >>> If you run facter -p on the client side does it load the custom fact? >>> If it''s loading the fact successfully on the agent, is this fact >>> uploaded to the masters $vardir/yaml/facts directory? >>> >>> 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. >>> >>> >> >-- 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.
Craig White
2011-Jul-29 16:23 UTC
Re: [Puppet Users] Another Custom Fact deployment problem
On Jul 29, 2011, at 8:54 AM, Guy Matz wrote:> hmm . . . my custom facts are in /var/opt/lib/pe-puppet/lib/puppet/facter, but if I put them in /var/opt/lib/pe-puppet/lib/facter they *do* show up in facter -p . . . does that mean I am "packaging" my facts incorrectly on the server? Or is my client misconfigured? > puppet.conf on my client is: > [main] > vardir = /var/opt/lib/pe-puppet > logdir = /var/log/pe-puppet > rundir = /var/run/pe-puppet > modulepath = /etc/puppetlabs/puppet/modules > user = pe-puppet > group = pe-puppet > > [agent] > certname = gmatzpupnode.mserv.local > server = gmatzpupmaster.mserv.local > report = true > classfile = $vardir/classes.txt > localconfig = $vardir/localconfig > graph = true > pluginsync = true > > > Again, the fact is defined on the server in modules/ldap/lib/puppet/facter . . .---- You can specifically set a factpath in puppet.conf (or actually agent.conf for your clients)... example... factpath = $vardir/lib/facter, $vardir/yaml/facts to see what it set on your system (settings not explicitly defined are still settings) puppet agent --genconfig |grep factpath Craig -- 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.
Nigel Kersten
2011-Aug-02 14:32 UTC
Re: [Puppet Users] Another Custom Fact deployment problem
On Fri, Jul 29, 2011 at 9:00 AM, Guy Matz <gmatz@matz.org> wrote:> Nan, thanks for the hint! If I put the facts in module/lib/facter they > work on the client . . . I used puppet-module to create the module and > followed the directions for creating a custom fact, but I guess they need to > go in module/lib/facter, not module/lib/puppet/facter . . . >Guy, are you saying the directions said to put the facts in lib/puppet/facter ?> > thanks a lot everyone! > > > On Fri, Jul 29, 2011 at 11:54 AM, Guy Matz <gmatz@matz.org> wrote: > >> hmm . . . my custom facts are in >> /var/opt/lib/pe-puppet/lib/puppet/facter, but if I put them in >> /var/opt/lib/pe-puppet/lib/facter they *do* show up in facter -p . . . does >> that mean I am "packaging" my facts incorrectly on the server? Or is my >> client misconfigured? >> puppet.conf on my client is: >> [main] >> vardir = /var/opt/lib/pe-puppet >> logdir = /var/log/pe-puppet >> rundir = /var/run/pe-puppet >> modulepath = /etc/puppetlabs/puppet/modules >> user = pe-puppet >> group = pe-puppet >> >> [agent] >> certname = gmatzpupnode.mserv.local >> server = gmatzpupmaster.mserv.local >> report = true >> classfile = $vardir/classes.txt >> localconfig = $vardir/localconfig >> graph = true >> pluginsync = true >> >> >> Again, the fact is defined on the server in modules/ldap/lib/puppet/facter >> . . . >> >> Thanks again >> >> >> >> On Fri, Jul 29, 2011 at 11:48 AM, Guy Matz <gmatz@matz.org> wrote: >> >>> No!!! facter -p does *not* show my facts . . . what does that mean!? >>> >>> thank *you*! >>> >>> >>> On Fri, Jul 29, 2011 at 11:42 AM, Nan Liu <nan@puppetlabs.com> wrote: >>> >>>> On Fri, Jul 29, 2011 at 11:38 AM, Guy Matz <gmatz@matz.org> wrote: >>>> > yeah, I got that set . . . yeah, I should have mentioned that the >>>> facts do >>>> > get downloaded on the client to $vardir/lib/puppet/facter . . . but >>>> still >>>> > the facts are not available! >>>> >>>> If you run facter -p on the client side does it load the custom fact? >>>> If it''s loading the fact successfully on the agent, is this fact >>>> uploaded to the masters $vardir/yaml/facts directory? >>>> >>>> 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. >>>> >>>> >>> >> > -- > 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. >-- Nigel Kersten Product Manager, Puppet Labs *Join us for **PuppetConf * <http://www.bit.ly/puppetconfsig> Sept 22/23 Portland, Oregon, USA. * * -- 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.