Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix fedora #167

Merged
merged 3 commits into from

2 participants

@cmurphy
Collaborator

Two commits here that fix deployments on Fedora 20 and 21:

1) Puppet was failing to add the erlang-solutions repo because Erlang doesn't provide a repo for newer versions of Fedora. Fixed by not requiring that repo on Fedora since the Fedora repos have new enough erlang.
2) A syntax issue was causing Puppet to fail trying to require the yum_refresh exec when that class wasn't included on Fedora. Fixed by reorganizing yum_refresh elements to make a little more sense.

Last commit formalizes support for Fedora in the metadata.

cmurphy added some commits
@cmurphy cmurphy Don't install erlang yum repo on Fedora
Erlang-solutions does not have a yum repo for fedora 20-21, but the
Fedora repos already have an up-to-date version of erlang, so don't try
to install a new repo.
153d9c2
@cmurphy cmurphy Reorganize yum_refresh
Without this patch, the yum_refresh class was only added for
CentOS/RedHat systems and not Fedora systems because it was being
included in the same class as epel. Since yum_refresh has nothing to do
with epel and since yum_refresh is applicable to Fedora, this patch
moves the yum_refresh inclusion to the repo class and does ordering
within the yum_refresh class instead of for just the rdo repo.
429a702
@cmurphy cmurphy Add Fedora 20 and 21 as supported platforms 79cdd93
@hunner hunner merged commit 2a2c2c4 into puppetlabs:master

1 check passed

Details continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 31, 2015
  1. @cmurphy

    Don't install erlang yum repo on Fedora

    cmurphy authored
    Erlang-solutions does not have a yum repo for fedora 20-21, but the
    Fedora repos already have an up-to-date version of erlang, so don't try
    to install a new repo.
  2. @cmurphy

    Reorganize yum_refresh

    cmurphy authored
    Without this patch, the yum_refresh class was only added for
    CentOS/RedHat systems and not Fedora systems because it was being
    included in the same class as epel. Since yum_refresh has nothing to do
    with epel and since yum_refresh is applicable to Fedora, this patch
    moves the yum_refresh inclusion to the repo class and does ordering
    within the yum_refresh class instead of for just the rdo repo.
  3. @cmurphy
This page is out of date. Refresh to see the latest.
View
9 manifests/profile/rabbitmq.pp
@@ -4,9 +4,12 @@
if $::osfamily == 'RedHat' {
package { 'erlang':
- ensure => installed,
- before => Package['rabbitmq-server'],
- require => Yumrepo['erlang-solutions'],
+ ensure => installed,
+ before => Package['rabbitmq-server'],
+ }
+ # Erlang solutions doesn't have a yum repo for Fedora >= 17, but Fedora has an up-to-date erlang
+ if $::operatingsystem != 'Fedora' {
+ Yumrepo['erlang-solutions'] -> Package['erlang']
}
}
View
1  manifests/resources/repo.pp
@@ -10,6 +10,7 @@
if $::osfamily == 'RedHat' {
class {'openstack::resources::repo::rdo': release => $release }
class {'openstack::resources::repo::erlang': }
+ class {'openstack::resources::repo::yum_refresh': }
} elsif $::osfamily == 'Debian' {
class {'openstack::resources::repo::uca': release => $release }
}
View
1  manifests/resources/repo/epel.pp
@@ -2,7 +2,6 @@
if ($::osfamily == 'RedHat' and
$::operatingsystem != 'Fedora' and
$::operatingsystemmajrelease >= 6) {
- include openstack::resources::repo::yum_refresh
include ::epel
}
View
7 manifests/resources/repo/erlang.pp
@@ -1,9 +1,6 @@
class openstack::resources::repo::erlang {
- if $::osfamily == 'RedHat' {
- case $::operatingsystem {
- fedora: { $dist = 'fedora' }
- default: { $dist = 'centos' }
- }
+ if $::osfamily == 'RedHat' and $::operatingsystem != 'Fedora' {
+ $dist = 'centos' # There isn't a repo for fedora >= 17
$osver = regsubst($::operatingsystemrelease, '(\d+)\..*', '\1')
View
1  manifests/resources/repo/rdo.pp
@@ -21,7 +21,6 @@
gpgcheck => 1,
gpgkey => "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-RDO-${release_cap}",
priority => 98,
- notify => Exec['yum_refresh'],
}
file { "/etc/pki/rpm-gpg/RPM-GPG-KEY-RDO-${release_cap}":
source => "puppet:///modules/openstack/RPM-GPG-KEY-RDO-${release_cap}",
View
2  manifests/resources/repo/yum_refresh.pp
@@ -4,5 +4,5 @@
command => '/usr/bin/yum clean all',
refreshonly => true,
}
- Exec['yum_refresh'] -> Package<||>
+ Yumrepo<||> ~> Exec['yum_refresh'] -> Package<||>
}
View
4 metadata.json
@@ -17,6 +17,10 @@
"operatingsystemrelease": ["6", "7"]
},
{
+ "operatingsystem": "Fedora",
+ "operatingsystemrelease": ["20", "21"]
+ },
+ {
"operatingsystem": "Ubuntu",
"operatingsystemrelease": ["14.04"]
}
Something went wrong with that request. Please try again.