[Puppet Users] (RHEL) RHN banning && require package

2010-11-03 Thread erikthered
I'm looking to get around a bit of a problem I've run into with
Puppet.   On my puppet master, I have this definition:


class httpd {
package { httpd:
ensure => installed
}

file { "/etc/httpd/conf/httpd.conf":
  source => ["puppet:///httpd/httpd.conf-$my_role", "puppet:///
httpd/httpd.conf-$hostname","puppet:///httpd/httpd.conf" ],
  mode => 644,
  require => Package["httpd"]
}

group { apache: gid => 48 }

user { apache:
  comment => "Apache",
  uid => 48,
  gid => 48,
  home => "/var/www",
  shell => "/sbin/nologin"
}

service { "httpd":
  enable => true,
  ensure => running,
  require => Package["httpd"],
  subscribe => [ file["/etc/httpd/conf/httpd.conf"],
package["httpd"] ]
}
}


>From what I understood this would enforce the package would be
installed, and keep httpd running, which is the desired effect.
However, since puppetd checks in about every 30 min, I noticed in my
log that yum was throwing an error about "network abuse" due to the
polling of yum to make sure the package is installed.

I'm curious if I could use a "schedule" and include that in the
package definition there.

i.e. add:

schedule { daily: period => daily, range => [2, 4] }

and then modify the package def:
package { httpd:
ensure => installed,
schedule => daily

}

Would that be the best way to handle this issue?  Any opinions?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] (RHEL) RHN banning && require package

2010-11-03 Thread Patrick Mohr
On Wed, Nov 3, 2010 at 10:37 AM, erikthered  wrote:

> I'm looking to get around a bit of a problem I've run into with
> Puppet.   On my puppet master, I have this definition:
>
> Would that be the best way to handle this issue?  Any opinions?
>
>
I think they best way would be to put a caching proxy between your computers
and the mirror or run your own mirror.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.