Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

So a few weeks ago I started on the path to using puppet to automate all the configs/services. At the time I was using the EPEL repo, which installed version 2.6.x. After some reading I was trying to gain access to the flatten method available via the puppet stdlib, and thought it was available by default in the newer 2.7.x version. So I added a puppet repo with the following settings:

[puppetlabs]
name=Puppet Labs Packages
baseurl=http://yum.puppetlabs.com/el/$releasever/products/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs

The problem with this, is it installed v3.0.x instead of 2.7.x. And apparently 3.0.x is a major upgrade which was released only a few weeks ago. Obviously I would prefer to use the 2.7.x for the next few months while PuppetLabs fix any defects which will inevitably arise after a major version.

So my question is, what setting can I add to the puppet repo config to pull down only the 2.7.x branch and not the 3.0.x branch?

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

Use the yum-versionlock plugin to lock the package version to what you want:

yum install yum-versionlock

To continue:

If you have already installed puppet

Now edit /etc/yum/pluginconf.d/versionlock.list and specify the version you want:

puppet 2.7.19
puppet-server 2.7.19

Finally install it. Depending on your current situation, use only one of:

yum upgrade puppet
yum downgrade puppet
yum distro-sync

If you have not already installed puppet

Install a specific version of puppet:

yum install puppet-2.7.19
yum install puppet-server-2.7.19

Lock the package version to the currently installed version:

yum versionlock puppet
yum versionlock puppet-server
share|improve this answer
    
Awesome. Thanks. –  Mike Purcell Oct 20 '12 at 22:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.