Phil Gardner
2013-Jun-20 16:39 UTC
[Puppet Users] Templates modified on puppetmaster but clients not seeing changes
Has anyone experienced this before? The template works fine and creates the file no problem if the file doesn''t exist, but it will not change the file if I modify the template. My google-fu has come up short. Using 2.7.17. -- _____________________ Phil Gardner PGP Key ID 0xFECC890C OTR Fingerprint 6707E9B8 BD6062D3 5010FE8B 36D614E3 D2F80538 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Dan White
2013-Jun-20 16:50 UTC
Re: [Puppet Users] Templates modified on puppetmaster but clients not seeing changes
What''s the manifest for the file resource, please ? Could be any number of things “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) ----- Original Message ----- From: "Phil Gardner" <phil.gardnerjr@gmail.com> To: puppet-users@googlegroups.com Sent: Thursday, June 20, 2013 12:39:14 PM Subject: [Puppet Users] Templates modified on puppetmaster but clients not seeing changes Has anyone experienced this before? The template works fine and creates the file no problem if the file doesn''t exist, but it will not change the file if I modify the template. My google-fu has come up short. Using 2.7.17. -- _____________________ Phil Gardner PGP Key ID 0xFECC890C OTR Fingerprint 6707E9B8 BD6062D3 5010FE8B 36D614E3 D2F80538 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Phil Gardner
2013-Jun-20 17:22 UTC
Re: [Puppet Users] Templates modified on puppetmaster but clients not seeing changes
nodes.pp: node /^testserver-.*/ { $centos_version = ''6.4'' $updates_enabled = ''1'' include yum_new } -- modules/yum/manifests/init.pp: class yum { file { ''CentOS-Base.repo'': mode => ''0644'', owner => ''root'', group => ''root'', path => ''/etc/yum.repos.d/CentOS-Base.repo'', content => template(''yum-new/CentOS-Base.repo.erb''), notify => Exec[''clean''], } exec { ''clean'': command => ''yum clean all'', path => ''/usr/bin/'', refreshonly => true, } } -- modules/yum/templates/CentOS-Base.repo.erb: [base] name=CentOS-$releasever - Base #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ baseurl=http://yumrepo.<%= @datacenter %>.example.net/repos/centos/<%centos_version %>/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #released updates [updates] name=CentOS-$releasever - Updates #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ baseurl=http://yumrepo2.<%= @datacenter %>.example.net/repos/centos/<%centos_version %>/updates/$basearch/ enabled=<%= updates_enabled -%> gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 -- On 06/20/2013 12:50 PM, Dan White wrote:> What''s the manifest for the file resource, please ? > Could be any number of things > > “Sometimes I think the surest sign that intelligent life exists > elsewhere in the universe is that none of it has tried to contact us.” > Bill Waterson (Calvin & Hobbes) > > ------------------------------------------------------------------------ > *From: *"Phil Gardner" <phil.gardnerjr@gmail.com> > *To: *puppet-users@googlegroups.com > *Sent: *Thursday, June 20, 2013 12:39:14 PM > *Subject: *[Puppet Users] Templates modified on puppetmaster but clients > not seeing changes > > Has anyone experienced this before? The template works fine and creates > the file no problem if the file doesn''t exist, but it will not change > the file if I modify the template. > > My google-fu has come up short. Using 2.7.17. > > > > -- > _____________________ > Phil Gardner > PGP Key ID 0xFECC890C > OTR Fingerprint 6707E9B8 BD6062D3 5010FE8B 36D614E3 D2F80538 > > -- > You received this message because you are subscribed to the Google > Groups "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- > You received this message because you are subscribed to the Google > Groups "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > For more options, visit https://groups.google.com/groups/opt_out. > >-- _____________________ Phil Gardner PGP Key ID 0xFECC890C OTR Fingerprint 6707E9B8 BD6062D3 5010FE8B 36D614E3 D2F80538 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Phil Gardner
2013-Jun-20 17:27 UTC
Re: [Puppet Users] Templates modified on puppetmaster but clients not seeing changes
whoops, ignore ''include yum_new'', the class is actually called that, I was just trying to clean up the manifest a bit and forgot to do the same in the nodes section. On 06/20/2013 01:22 PM, Phil Gardner wrote:> nodes.pp: > > node /^testserver-.*/ { > $centos_version = ''6.4'' > $updates_enabled = ''1'' > include yum_new > } > > -- > > modules/yum/manifests/init.pp: > > class yum { > file { ''CentOS-Base.repo'': > mode => ''0644'', > owner => ''root'', > group => ''root'', > path => ''/etc/yum.repos.d/CentOS-Base.repo'', > content => template(''yum-new/CentOS-Base.repo.erb''), > notify => Exec[''clean''], > } > exec { ''clean'': > command => ''yum clean all'', > path => ''/usr/bin/'', > refreshonly => true, > } > } > > -- > > modules/yum/templates/CentOS-Base.repo.erb: > > [base] > name=CentOS-$releasever - Base > #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os > #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ > baseurl=http://yumrepo.<%= @datacenter %>.example.net/repos/centos/<%> centos_version %>/os/$basearch/ > gpgcheck=1 > gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 > > #released updates > [updates] > name=CentOS-$releasever - Updates > #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates > #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ > baseurl=http://yumrepo2.<%= @datacenter %>.example.net/repos/centos/<%> centos_version %>/updates/$basearch/ > enabled=<%= updates_enabled -%> > gpgcheck=1 > gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 > > -- > > On 06/20/2013 12:50 PM, Dan White wrote: >> What''s the manifest for the file resource, please ? >> Could be any number of things >> >> “Sometimes I think the surest sign that intelligent life exists >> elsewhere in the universe is that none of it has tried to contact us.” >> Bill Waterson (Calvin & Hobbes) >> >> ------------------------------------------------------------------------ >> *From: *"Phil Gardner" <phil.gardnerjr@gmail.com> >> *To: *puppet-users@googlegroups.com >> *Sent: *Thursday, June 20, 2013 12:39:14 PM >> *Subject: *[Puppet Users] Templates modified on puppetmaster but clients >> not seeing changes >> >> Has anyone experienced this before? The template works fine and creates >> the file no problem if the file doesn''t exist, but it will not change >> the file if I modify the template. >> >> My google-fu has come up short. Using 2.7.17. >> >> >> >> -- >> _____________________ >> Phil Gardner >> PGP Key ID 0xFECC890C >> OTR Fingerprint 6707E9B8 BD6062D3 5010FE8B 36D614E3 D2F80538 >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Puppet Users" group. >> To unsubscribe from this group and stop receiving emails from it, send >> an email to puppet-users+unsubscribe@googlegroups.com. >> To post to this group, send email to puppet-users@googlegroups.com. >> Visit this group at http://groups.google.com/group/puppet-users. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Puppet Users" group. >> To unsubscribe from this group and stop receiving emails from it, send >> an email to puppet-users+unsubscribe@googlegroups.com. >> To post to this group, send email to puppet-users@googlegroups.com. >> Visit this group at http://groups.google.com/group/puppet-users. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >-- _____________________ Phil Gardner PGP Key ID 0xFECC890C OTR Fingerprint 6707E9B8 BD6062D3 5010FE8B 36D614E3 D2F80538 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Dan White
2013-Jun-20 20:02 UTC
Re: [Puppet Users] Templates modified on puppetmaster but clients not seeing changes
The obvious first. “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) ----- Original Message ----- From: "Phil Gardner" <phil.gardnerjr@gmail.com> To: puppet-users@googlegroups.com Sent: Thursday, June 20, 2013 1:22:44 PM Subject: Re: [Puppet Users] Templates modified on puppetmaster but clients not seeing changes nodes.pp: node /^testserver-.*/ { $centos_version = ''6.4'' $updates_enabled = ''1'' include yum_new <----------------------- this does not match the name of the module or class } -- modules/yum/manifests/init.pp: class yum { file { ''CentOS-Base.repo'': mode => ''0644'', owner => ''root'', group => ''root'', path => ''/etc/yum.repos.d/CentOS-Base.repo'', content => template(''yum-new/CentOS-Base.repo.erb''), <---- this does not match the name of the module notify => Exec[''clean''], } exec { ''clean'': command => ''yum clean all'', path => ''/usr/bin/'', refreshonly => true, } } -- modules/yum/templates/CentOS-Base.repo.erb: <---- this does not match the path in the template parameter [base] name=CentOS-$releasever - Base #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ baseurl=http://yumrepo.<%= @datacenter %>.example.net/repos/centos/<%centos_version %>/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #released updates [updates] name=CentOS-$releasever - Updates #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ baseurl=http://yumrepo2.<%= @datacenter %>.example.net/repos/centos/<%centos_version %>/updates/$basearch/ enabled=<%= updates_enabled -%> gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 -- On 06/20/2013 12:50 PM, Dan White wrote:> What''s the manifest for the file resource, please ? > Could be any number of things > > “Sometimes I think the surest sign that intelligent life exists > elsewhere in the universe is that none of it has tried to contact us.” > Bill Waterson (Calvin & Hobbes) > > ------------------------------------------------------------------------ > *From: *"Phil Gardner" <phil.gardnerjr@gmail.com> > *To: *puppet-users@googlegroups.com > *Sent: *Thursday, June 20, 2013 12:39:14 PM > *Subject: *[Puppet Users] Templates modified on puppetmaster but clients > not seeing changes > > Has anyone experienced this before? The template works fine and creates > the file no problem if the file doesn''t exist, but it will not change > the file if I modify the template. > > My google-fu has come up short. Using 2.7.17. > > > > -- > _____________________ > Phil Gardner > PGP Key ID 0xFECC890C > OTR Fingerprint 6707E9B8 BD6062D3 5010FE8B 36D614E3 D2F80538 > > -- > You received this message because you are subscribed to the Google > Groups "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- > You received this message because you are subscribed to the Google > Groups "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > For more options, visit https://groups.google.com/groups/opt_out. > >-- _____________________ Phil Gardner PGP Key ID 0xFECC890C OTR Fingerprint 6707E9B8 BD6062D3 5010FE8B 36D614E3 D2F80538 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Dan White
2013-Jun-20 20:09 UTC
Re: [Puppet Users] Templates modified on puppetmaster but clients not seeing changes
Trying again, less typos: http://docs.puppetlabs.com/references/latest/type.html#exec scroll down to the "refreshonly" parameter and compare it to your code. “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) ----- Original Message ----- From: "Phil Gardner" <phil.gardnerjr@gmail.com> To: puppet-users@googlegroups.com Sent: Thursday, June 20, 2013 1:22:44 PM Subject: Re: [Puppet Users] Templates modified on puppetmaster but clients not seeing changes nodes.pp: node /^testserver-.*/ { $centos_version = ''6.4'' $updates_enabled = ''1'' include yum } -- modules/yum/manifests/init.pp: class yum { file { ''CentOS-Base.repo'': mode => ''0644'', owner => ''root'', group => ''root'', path => ''/etc/yum.repos.d/CentOS-Base.repo'', content => template(''yum/CentOS-Base.repo.erb''), notify => Exec[''clean''], } exec { ''clean'': command => ''yum clean all'', path => ''/usr/bin/'', --> subscribe => File["/etc/yum.repos.d/CentOS-Base.repo"], <--- You need to tell it what file to watch ! refreshonly => true, } } -- modules/yum/templates/CentOS-Base.repo.erb: [base] name=CentOS-$releasever - Base #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ baseurl=http://yumrepo.<%= @datacenter %>.example.net/repos/centos/<%centos_version %>/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #released updates [updates] name=CentOS-$releasever - Updates #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ baseurl=http://yumrepo2.<%= @datacenter %>.example.net/repos/centos/<%centos_version %>/updates/$basearch/ enabled=<%= updates_enabled -%> gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Phil Gardner
2013-Jun-20 20:42 UTC
Re: [Puppet Users] Templates modified on puppetmaster but clients not seeing changes
I fail for confusing underscores and hyphens. Thanks for helping point that out. The issue was that I was pointing to the wrong module. As for the notify/exec portion, it actually runs fine with just having it notify the exec when the file changes. It seems to work with the way it is, without having subscribe in the exec resource. Carry on, nothing to see here except some typos... On 06/20/2013 04:09 PM, Dan White wrote:> Trying again, less typos: > > http://docs.puppetlabs.com/references/latest/type.html#exec > scroll down to the "refreshonly" parameter and compare it to your code. > > “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” > Bill Waterson (Calvin & Hobbes) > > ----- Original Message ----- > From: "Phil Gardner" <phil.gardnerjr@gmail.com> > To: puppet-users@googlegroups.com > Sent: Thursday, June 20, 2013 1:22:44 PM > Subject: Re: [Puppet Users] Templates modified on puppetmaster but clients not seeing changes > > nodes.pp: > > node /^testserver-.*/ { > $centos_version = ''6.4'' > $updates_enabled = ''1'' > include yum > } > > -- > > modules/yum/manifests/init.pp: > > class yum { > file { ''CentOS-Base.repo'': > mode => ''0644'', > owner => ''root'', > group => ''root'', > path => ''/etc/yum.repos.d/CentOS-Base.repo'', > content => template(''yum/CentOS-Base.repo.erb''), > notify => Exec[''clean''], > } > exec { ''clean'': > command => ''yum clean all'', > path => ''/usr/bin/'', > --> subscribe => File["/etc/yum.repos.d/CentOS-Base.repo"], <--- You need to tell it what file to watch ! > refreshonly => true, > } > } > > -- > > modules/yum/templates/CentOS-Base.repo.erb: > > [base] > name=CentOS-$releasever - Base > #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os > #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ > baseurl=http://yumrepo.<%= @datacenter %>.example.net/repos/centos/<%> centos_version %>/os/$basearch/ > gpgcheck=1 > gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 > > #released updates > [updates] > name=CentOS-$releasever - Updates > #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates > #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ > baseurl=http://yumrepo2.<%= @datacenter %>.example.net/repos/centos/<%> centos_version %>/updates/$basearch/ > enabled=<%= updates_enabled -%> > gpgcheck=1 > gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 >-- _____________________ Phil Gardner PGP Key ID 0xFECC890C OTR Fingerprint 6707E9B8 BD6062D3 5010FE8B 36D614E3 D2F80538 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.