Bryan Schneiders
2009-Dec-04 18:50 UTC
[Puppet Users] yumrepo is missing name attribute in repo files using puppet-0.24.8-4.el5
I''m using puppet-0.24.8-4.el5 on CentOS 5.4. My problem is yumrepo isn''t writing the "name=" field to the repository files which causes yum to complain with the error: Repository ''local-CentOS-5.4-x86_64'' is missing name in configuration, using id I get this behavior on all of my yumrepo definitions. One of them looks like this: yumrepo { "local-$lsbdistid-$release-$architecture": name => "local-$lsbdistid-$release-$architecture", baseurl => "http://hostname.changed.com:80/cobbler/ks_mirror/ $lsbdistid-$release-$architecture", enabled => 1, gpgcheck => 0, priority => 10; } and the resulting file contents are: [local-CentOS-5.4-x86_64] baseurl=http://hostname.changed.com:80/cobbler/ks_mirror/CentOS-5.4- x86_64 enabled=1 gpgcheck=0 priority=10 I can''t find any mailing list discussions or bug reports on this. Can anyone verify this behavior on other versions of puppet? -- 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.
Avi Miller
2009-Dec-04 18:58 UTC
Re: [Puppet Users] yumrepo is missing name attribute in repo files using puppet-0.24.8-4.el5
Hi, Bryan Schneiders wrote:> name => "local-$lsbdistid-$release-$architecture",Try this instead: name => "local-${lsbdistid}-${release}-${architecture}", I use this method of referencing variables when sending out my local Yum repositories, and it works for me. cYa, Avi -- 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.
Bryan
2009-Dec-04 20:40 UTC
[Puppet Users] Re: yumrepo is missing name attribute in repo files using puppet-0.24.8-4.el5
Never mind. Apparently the answer is to use the "descr" option in yumrepo, not the name option. It would be nice if the documentation made any mention of this. http://reductivelabs.com/trac/puppet/wiki/TypeReference#descr On Fri, Dec 4, 2009 at 1:50 PM, Bryan Schneiders <bryan.schneiders@gmail.com> wrote:> I''m using puppet-0.24.8-4.el5 on CentOS 5.4. > > My problem is yumrepo isn''t writing the "name=" field to the > repository files which causes yum to complain with the error: > > Repository ''local-CentOS-5.4-x86_64'' is missing name in configuration, > using id > > I get this behavior on all of my yumrepo definitions. One of them > looks like this: > > yumrepo { > "local-$lsbdistid-$release-$architecture": > name => "local-$lsbdistid-$release-$architecture", > baseurl => "http://hostname.changed.com:80/cobbler/ks_mirror/ > $lsbdistid-$release-$architecture", > enabled => 1, > gpgcheck => 0, > priority => 10; > } > > and the resulting file contents are: > > [local-CentOS-5.4-x86_64] > baseurl=http://hostname.changed.com:80/cobbler/ks_mirror/CentOS-5.4- > x86_64 > enabled=1 > gpgcheck=0 > priority=10 > > I can''t find any mailing list discussions or bug reports on this. Can > anyone verify this behavior on other versions of puppet?-- 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.
Todd Zullinger
2009-Dec-04 21:08 UTC
Re: [Puppet Users] Re: yumrepo is missing name attribute in repo files using puppet-0.24.8-4.el5
Bryan wrote:> Apparently the answer is to use the "descr" option in yumrepo, not the > name option. > > It would be nice if the documentation made any mention of this. > > http://reductivelabs.com/trac/puppet/wiki/TypeReference#descrPerhaps like this? --- >8 --- From: Todd Zullinger <tmz@pobox.com> Date: Fri, 4 Dec 2009 16:04:33 -0500 Subject: [PATCH/puppet] yumrepo: Clarify the name and descr parameters Most parameters are identical between the yumrepo type and the yum configuration files. The name and descr parameters are exceptions worth noting in the documentation. Signed-off-by: Todd Zullinger <tmz@pobox.com> --- lib/puppet/type/yumrepo.rb | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/lib/puppet/type/yumrepo.rb b/lib/puppet/type/yumrepo.rb index 39b9cd3..51ed17b 100644 --- a/lib/puppet/type/yumrepo.rb +++ b/lib/puppet/type/yumrepo.rb @@ -233,12 +233,14 @@ module Puppet end newparam(:name) do - desc "The name of the repository." + desc "The name of the repository. This corresponds to the + repositoryid parameter in yum.conf(5)." isnamevar end newproperty(:descr, :parent => Puppet::IniProperty) do desc "A human readable description of the repository. + This corresponds to the name parameter in yum.conf(5). #{ABSENT_DOC}" newvalue(:absent) { self.should = :absent } newvalue(/.*/) { } -- 1.6.6.rc1 -- Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Does it follow that I reject all authority? Perish the thought. In the matter of boots, I defer to the authority of the boot-maker. -- Mikhail Bakunin -- 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.