Hi all, Seems that ensure => absent is not working on puppet 2.6.12 yumrepo type. ''sl-5.5-base'' : baseurl => ''http://reposerver/computing-SL-55-base-x86_64/RPMS.base/'', descr => ''SL 5.5 base'', enabled => absent, exclude => ''yum-conf* c-ares''; # ls -lsa /etc/yum.repos.d/sl-5.5-base.repo 4 -rw-r--r-- 1 root root 187 Nov 15 15:35 /etc/yum.repos.d/sl-5.5-base.repo #puppetd --test --server $server [...] info: create new repo sl-5.5-base in file /etc/yum.repos.d/sl-5.5-base.repo notice: /Stage[pre]/Common::Os::Release5::Sl55::Repos/Yumrepo[sl-5.5-base]/descr: descr changed '''' to ''SL 5.5 base'' notice: /Stage[pre]/Common::Os::Release5::Sl55::Repos/Yumrepo[sl-5.5-base]/baseurl: baseurl changed '''' to ''http://reposerver/computing-SL-55-base-x86_64/RPMS.bas e/'' notice: /Stage[pre]/Common::Os::Release5::Sl55::Repos/Yumrepo[sl-5.5-base]/gpgcheck: gpgcheck changed '''' to ''0'' notice: /Stage[pre]/Common::Os::Release5::Sl55::Repos/Yumrepo[sl-5.5-base]/exclude: exclude changed '''' to ''yum-conf* c-ares'' notice: /Stage[pre]/Common::Os::Release5::Sl55::Repos/Yumrepo[sl-5.5-base]/enablegroups: enablegroups changed '''' to ''1'' notice: /Stage[pre]/Common::Os::Release5::Sl55::Repos/Yumrepo[sl-5.5-base]/metadata_expire: metadata_expire changed '''' to ''43200'' info: changing mode of /etc/yum.repos.d/sl-5.5-base.repo from 600 to 644 info: create new repo sl-5.5-fastbugs in file /etc/yum.repos.d/sl-5.5-fastbugs.repo [...] notice that "enabled" parameter is ignored I''ve been looking at list and bug and only found something nearly related: http://projects.puppetlabs.com/issues/9410 but it''s not my problem. Is this a know problem/bug? TIA, Arnau -- 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.
Sorry, forgot to mention that if we set 0 instead of absent, the parameter works: notice: /Stage[pre]/Common::Os::Release5::Sl55::Repos/Yumrepo[sl-5.5-base]/enabled: enabled changed '''' to ''0'' Cheers, Arnau -- 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 Tue, Nov 15, 2011 at 9:53 AM, Arnau Bria <arnaubria@pic.es> wrote:> Sorry, > > forgot to mention that if we set 0 instead of absent, the parameter > works: > > notice: /Stage[pre]/Common::Os::Release5::Sl55::Repos/Yumrepo[sl-5.5-base]/enabled: enabled changed '''' to ''0''A quick glance at the type shows you need to set 1 or 0, absent means the property should not exist rather than puppet should configure the value to 0. present/absent is not an alias for 1/0. A quick test confirms this: # puppet resource yumrepo foreman yumrepo { ''foreman'': baseurl => ''http://yum.theforeman.org/stable'', descr => ''Foreman Repo'', enabled => ''1'', gpgcheck => ''0'', } # puppet resource yumrepo foreman enabled=absent notice: /Yumrepo[foreman]/enabled: undefined ''enabled'' from ''1'' yumrepo { ''foreman'': } # puppet resource yumrepo foreman yumrepo { ''foreman'': baseurl => ''http://yum.theforeman.org/stable'', descr => ''Foreman Repo'', gpgcheck => ''0'', } 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.
Arnau Bria
2011-Nov-15 16:13 UTC
Re: [Puppet Users] Re: yumrepo absent not working on 2.6.12
On Tue, 15 Nov 2011 10:06:43 -0500 Nan Liu wrote: [...]> A quick glance at the type shows you need to set 1 or 0, absent means > the property should not exist rather than puppet should configure the > value to 0.Ok. I understood that absent removes the file. My fault. any way for removing the repo without using a file type? Many thanks for your reply Nan, Arnau -- 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.
Stefan Schulte
2011-Nov-15 16:18 UTC
Re: [Puppet Users] yumrepo absent not working on 2.6.12
On Tue, Nov 15, 2011 at 03:49:57PM +0100, Arnau Bria wrote:> Hi all, > > Seems that ensure => absent is not working on puppet 2.6.12 > yumrepo type. > > ''sl-5.5-base'' : > baseurl => ''http://reposerver/computing-SL-55-base-x86_64/RPMS.base/'', > descr => ''SL 5.5 base'', > enabled => absent, > exclude => ''yum-conf* c-ares''; > > # ls -lsa /etc/yum.repos.d/sl-5.5-base.repo > 4 -rw-r--r-- 1 root root 187 Nov 15 15:35 /etc/yum.repos.d/sl-5.5-base.repo > > #puppetd --test --server $server > [...] > info: create new repo sl-5.5-base in file /etc/yum.repos.d/sl-5.5-base.repo > notice: /Stage[pre]/Common::Os::Release5::Sl55::Repos/Yumrepo[sl-5.5-base]/descr: descr changed '''' to ''SL 5.5 base'' > notice: /Stage[pre]/Common::Os::Release5::Sl55::Repos/Yumrepo[sl-5.5-base]/baseurl: baseurl changed '''' to ''http://reposerver/computing-SL-55-base-x86_64/RPMS.bas > e/'' > notice: /Stage[pre]/Common::Os::Release5::Sl55::Repos/Yumrepo[sl-5.5-base]/gpgcheck: gpgcheck changed '''' to ''0'' > notice: /Stage[pre]/Common::Os::Release5::Sl55::Repos/Yumrepo[sl-5.5-base]/exclude: exclude changed '''' to ''yum-conf* c-ares'' > notice: /Stage[pre]/Common::Os::Release5::Sl55::Repos/Yumrepo[sl-5.5-base]/enablegroups: enablegroups changed '''' to ''1'' > notice: /Stage[pre]/Common::Os::Release5::Sl55::Repos/Yumrepo[sl-5.5-base]/metadata_expire: metadata_expire changed '''' to ''43200'' > info: changing mode of /etc/yum.repos.d/sl-5.5-base.repo from 600 to 644 > info: create new repo sl-5.5-fastbugs in file /etc/yum.repos.d/sl-5.5-fastbugs.repo > [...] > > notice that "enabled" parameter is ignored > > > I''ve been looking at list and bug and only found something nearly > related: > http://projects.puppetlabs.com/issues/9410 > > but it''s not my problem. > > > Is this a know problem/bug?There is a at least a feature request to be able to remove a certain repository (not just disabling it but removing it all together) https://projects.puppetlabs.com/issues/9293 -Stefan
Ok, thnaks a lot. Cheers, Arnau -- 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.