Skip to content

Commit

Permalink
Merge pull request example42#184 from iansltx/php72
Browse files Browse the repository at this point in the history
Add Remi PHP 7.2 repo
  • Loading branch information
alvagante committed Mar 15, 2018
2 parents dab0137 + 70d22e3 commit d60d940
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions manifests/defaults.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
if 'remi_php56' in $yum::extrarepo { include ::yum::repo::remi_php56 }
if 'remi_php70' in $yum::extrarepo { include ::yum::repo::remi_php70 }
if 'remi_php71' in $yum::extrarepo { include ::yum::repo::remi_php71 }
if 'remi_php72' in $yum::extrarepo { include ::yum::repo::remi_php72 }
if 'tmz' in $yum::extrarepo and $osver[0] != '4' { include ::yum::repo::tmz }
if 'webtatic' in $yum::extrarepo { include ::yum::repo::webtatic }
if 'puppetlabs' in $yum::extrarepo and $osver[0] != '4' { include ::yum::repo::puppetlabs }
Expand Down
29 changes: 29 additions & 0 deletions manifests/repo/remi_php72.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# = Class: yum::repo::remi_php72
#
# This class installs the remi-php72 repo
#
class yum::repo::remi_php72 {
$releasever = $::operatingsystem ? {
/(?i:Amazon)/ => '6',
default => '$releasever', # Yum var
}

$os = $::operatingsystem ? {
/(?i:Fedora)/ => 'fedora',
default => 'enterprise',
}

$osname = $::operatingsystem ? {
/(?i:Fedora)/ => 'Fedora',
default => 'Enterprise Linux',
}

yum::managed_yumrepo { 'remi-php72':
descr => "Remi's PHP 7.2 RPM repository for ${osname} \$releasever - \$basearch",
mirrorlist => "http://rpms.remirepo.net/${os}/${releasever}/php72/mirror",
enabled => 1,
gpgcheck => 1,
gpgkey => 'http://rpms.remirepo.net/RPM-GPG-KEY-remi',
priority => 1,
}
}

0 comments on commit d60d940

Please sign in to comment.