Post details: Controlling which yum repos a client uses

01/31/06

Permalink 12:55:58 pm, Categories: Programming, Configuration management, Puppet, 131 words  

Controlling which yum repos a client uses

A very simple problem in managing Fedora machines with Puppet is that of controlling which yum repositories the machines get their updates from.

Puppet does not (yet) have a way to specify the client configuration of yum repositories; to work around this, we need to deploy the complete configuration for each repository to each client machine. To do this, we place all the repo files on puppet's file server and make sure they all have 'enabled=1' set. A simple repo file may look like

[somerepo]
baseurl=http://repo.example.com/yum
enabled=1
gpgcheck=0

For the puppet manifest, we define a simple 'yumrepo' type (see util.pp). In the site manifest, it is now possible to say:

import "util.pp"
node client {
  yumrepo { fedora : enabled => true }
  yumrepo { fedora-devel: enabled => false }
}
Permalink

Comments:

No Comments for this post yet...

Comments are closed for this post.

Search

Syndicate this blog XML

What is RSS?

Misc

powered by
b2evolution