Greetings all, (Hopefully this won''t be a HTML mail.) I''ve picked up puppet as a tool to manage a fairly small network of RHEL servers, and I''m really liking what I see so far. However, I''m having a pile of trouble with a class definition for a yum controller: # $Id$ class yum-rhel5 { file { "/etc/yum.conf": mode => 644, source => "puppet://$puppetserver/files/apps/yum/yum-rhel5.conf", ensure => true, } yumrepo { fred: baseurl => "http://deploy/", enabled => 0, descr => "Fred Local Repository", enablegroups => 1, gpgcheck => 0, } } $puppetserver is defined in site.pp. The fred repo is just for testing at the moment. When I run the puppetd client, I get: err: Could not create /etc/yum.conf: You cannot specify more than one of content, source, target at /etc/puppet/manifests/classes/yum.pp:7 err: You cannot specify more than one of content, source, target at /etc/puppet/manifests/classes/yum.pp:7 However, I can''t see where I''m doing that, especially since line 7 is the closing brace! There''s a reference to yum.conf in the type-def file for yumrepo, but it appears to be a read-in resource, not a managed resource. Someone mind hitting me with a clue-brick so I can get back to my seat-of-pants + docs learning? :) _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
On Wednesday 22 August 2007 09:39:07 Duncan Hill wrote:> Greetings all, > > (Hopefully this won''t be a HTML mail.) > > I''ve picked up puppet as a tool to manage a fairly small network of RHEL > servers, and I''m really liking what I see so far. However, I''m having a > pile of trouble with a class definition for a yum controller:Something I forgot - Puppet 0.23.1 from dlutter''s RHEL5 repo.
On Wed, Aug 22, 2007 at 09:39:07AM +0100, Duncan Hill wrote:> file { "/etc/yum.conf": > mode => 644, > source => "puppet://$puppetserver/files/apps/yum/yum-rhel5.conf", > ensure => true, > }Try without ensure, I think it is setting the target property. -- Valentin
On Wed, Aug 22, 2007 at 09:39:07AM +0100, Duncan Hill wrote:> (Hopefully this won''t be a HTML mail.)multipart/alternative, so not unreadable, just a touch of wasted bandwidth.> # $Id$ > class yum-rhel5 { > file { "/etc/yum.conf": > mode => 644, > source => "puppet://$puppetserver/files/apps/yum/yum-rhel5.conf", > ensure => true, > } > yumrepo { fred: > baseurl => "http://deploy/", > enabled => 0, > descr => "Fred Local Repository", > enablegroups => 1, > gpgcheck => 0, > } > } > > $puppetserver is defined in site.pp. The fred repo is just for testing at > $the moment. > > When I run the puppetd client, I get: > err: Could not create /etc/yum.conf: You cannot specify more than one of content, source, target at /etc/puppet/manifests/classes/yum.pp:7 > err: You cannot specify more than one of content, source, target at /etc/puppet/manifests/classes/yum.pp:7 > > However, I can''t see where I''m doing that, especially since line 7 is the > closing brace! There''s a reference to yum.conf in the type-def file for > yumrepo, but it appears to be a read-in resource, not a managed resource.Are you sure that the stuff you quoted above is actually /etc/puppet/manifests/classes/yum.pp ? - Matt -- Just because we work at a University doesn''t mean we''re surrounded by smart people. -- Brian Kantor, in the monastery
On Wednesday 22 August 2007 09:52:23 Valentin Vidic wrote:> On Wed, Aug 22, 2007 at 09:39:07AM +0100, Duncan Hill wrote: > > file { "/etc/yum.conf": > > mode => 644, > > source => > > "puppet://$puppetserver/files/apps/yum/yum-rhel5.conf", ensure => true, > > } > > Try without ensure, I think it is setting the target property.Cookie (or other treat of choice) for Valentin! :) info: Filebucket[/var/puppet/clientbucket]: Adding /etc/yum.conf(d8b7833f5efbc0aec86e4c9a642e3501) info: //default/yum-rhel5/File[/etc/yum.conf]: Filebucketed to puppet with sum d8b7833f5efbc0aec86e4c9a642e3501 notice: //default/yum-rhel5/File[/etc/yum.conf]/source: replacing from source puppet://10.150.20.102/files/apps/yum/yum-rhel5.conf with contents {md5}d46eebad968293f698daf4e1af232df3 Well, that''s certainly weird enough. Guess I don''t grok ensure enough yet. Thanks :)
On Aug 22, 2007, at 4:03 AM, Duncan Hill wrote:> Well, that''s certainly weird enough. Guess I don''t grok ensure > enough yet.The confusion here is that ''ensure'' has some special arguments, like ''file'', ''directory'', ''symlink'', and ''present''. Anything else is assumed to be a file that you want to symlink to. This last bit has recently been causing confusion, though, so maybe it''s time to get rid of that "feature". -- The great tragedy of Science - the slaying of a beautiful hypothesis by an ugly fact. --Thomas H. Huxley --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
On Wednesday 22 August 2007 16:00:12 Luke Kanies wrote:> On Aug 22, 2007, at 4:03 AM, Duncan Hill wrote: > > Well, that''s certainly weird enough. Guess I don''t grok ensure > > enough yet. > > The confusion here is that ''ensure'' has some special arguments, like > ''file'', ''directory'', ''symlink'', and ''present''. Anything else is > assumed to be a file that you want to symlink to. > > This last bit has recently been causing confusion, though, so maybe > it''s time to get rid of that "feature".Ahhh, yes, and I had ''true'', not ''present''. From the POV of a new puppet user, it''s definitely something I just didn''t pick up in the documentation (or it isn''t there). I''d even say it''s counter-intuitive - the problem will be anyone upgrading if you change it, might get a nasty surprise; unless puppet(master)d could warn that the rules no longer made sense?
On Aug 22, 2007, at 10:06 AM, Duncan Hill wrote:> From the POV of a new puppet user, it''s definitely something I just > didn''t > pick up in the documentation (or it isn''t there). I''d even say it''s > counter-intuitive - the problem will be anyone upgrading if you > change it, > might get a nasty surprise; unless puppet(master)d could warn that > the rules > no longer made sense?I would add a warning for a release or three, then change. -- Never interrupt your enemy when he is making a mistake. --Napolean Bonaparte --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
Maybe Matching Threads
- Yumrepo''s subscribe ran before package require Yumrepo?
- Component/type defaults for 0.22.x
- (New To Puppet)Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class sudo for pupclient on node pupclient
- Using multiple values for source, for platform/arch/host configs
- Ticket 616, service resource takes over puppetd port