patches no longer required for puppet/packstack for el7

Signed-off-by: Arif Ali <mail@arif-ali.co.uk>
This commit is contained in:
Arif Ali 2014-11-06 23:52:19 +00:00
parent ae75c9214c
commit f361df2eee
4 changed files with 0 additions and 124 deletions

View File

@ -1,11 +0,0 @@
--- a/manifests/version.pp 2014-08-27 12:24:57.659804760 +0100
+++ b/manifests/version.pp 2014-08-27 12:25:06.841971767 +0100
@@ -5,7 +5,7 @@
class apache::version {
case $::osfamily {
'RedHat': {
- if ($::operatingsystem == 'Fedora' and $::operatingsystemrelease >= 18) or ($::operatingsystem != 'Fedora' and $::operatingsystemrelease >= 7) {
+ if ($::operatingsystem == 'Fedora' and $::operatingsystemrelease >= 18) or ($::operatingsystem != 'Fedora' and $::operatingsystemmajrelease >= 7) {
$default = 2.4
} else {
$default = 2.2

View File

@ -1,60 +0,0 @@
diff --git a/manifests/params.pp b/manifests/params.pp
index 0e91e81..f1964d4 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -38,8 +38,8 @@
$provider = 'mysql'
}
}
- 'RedHat': {
- if $::operatingsystemrelease >= 7 {
+ /^(RedHat|CentOS|Scientific)$/: {
+ if $::operatingsystemmajrelease >= 7 {
$provider = 'mariadb'
} else {
$provider = 'mysql'
diff --git a/spec/classes/mysql_server_spec.rb b/spec/classes/mysql_server_spec.rb
index e21f22c..3184f65 100644
--- a/spec/classes/mysql_server_spec.rb
+++ b/spec/classes/mysql_server_spec.rb
@@ -75,6 +75,40 @@
end
end
+ context 'mysql::server::install on RHEL 7' do
+ let :facts do
+ { :osfamily => 'RedHat',
+ :operatingsystem => 'RedHat',
+ :operatingsystemmajrelease => 7
+ }
+ end
+
+ let(:params) {{ :package_ensure => 'present', :name => 'mariadb-server' }}
+ it do
+ should contain_package('mysql-server').with({
+ :ensure => :present,
+ :name => 'mariadb-server',
+ })
+ end
+ end
+
+ context 'mysql::server::install on CentOS 7' do
+ let :facts do
+ { :osfamily => 'RedHat',
+ :operatingsystem => 'CentOS',
+ :operatingsystemmajrelease => 7
+ }
+ end
+
+ let(:params) {{ :package_ensure => 'present', :name => 'mariadb-server' }}
+ it do
+ should contain_package('mysql-server').with({
+ :ensure => :present,
+ :name => 'mariadb-server',
+ })
+ end
+ end
+
context 'mysql::server::config' do
it do
should contain_file('/etc/mysql').with({

View File

@ -1,15 +0,0 @@
diff --git a/manifests/params.pp b/manifests/params.pp
index f553567..e62f58d 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -44,8 +44,8 @@
'Fedora', 'RedHat': {
$special_service_provider = undef
}
- 'RedHat': {
- if ($::operatingsystemrelease < 7) {
+ 'RedHat', 'CentOS', 'Scientific': {
+ if ($::operatingsystemmajrelease < 7) {
$special_service_provider = 'init'
} else {
$special_service_provider = undef

View File

@ -1,38 +0,0 @@
diff --git a/packstack/puppet/templates/amqp.pp b/packstack/puppet/templates/amqp.pp
index 15d7b5d..ca79707 100644
--- a/packstack/puppet/templates/amqp.pp
+++ b/packstack/puppet/templates/amqp.pp
@@ -44,7 +44,7 @@
}
'RedHat', 'CentOS': {
- if $::operatingsystemrelease >= 7 {
+ if $::operatingsystemmajrelease >= 7 {
$config = '/etc/qpid/qpidd.conf'
} else {
$config = '/etc/qpidd.conf'
diff --git a/packstack/puppet/templates/mysql_install.pp b/packstack/puppet/templates/mysql_install.pp
index 1364f79..6a33cba 100644
--- a/packstack/puppet/templates/mysql_install.pp
+++ b/packstack/puppet/templates/mysql_install.pp
@@ -1,6 +1,6 @@
# on EL6 we need to wait for innodb changes before starting mysqld
-if $::operatingsystem in ['RedHat','CentOS','Scientific'] and $::operatingsystemrelease < 7 {
+if $::operatingsystem in ['RedHat','CentOS','Scientific'] and $::operatingsystemmajrelease < 7 {
$manage_service = false
service { 'mysqld':
enable => true,
diff --git a/packstack/puppet/templates/prescript.pp b/packstack/puppet/templates/prescript.pp
index 4c95292..32d53e8 100644
--- a/packstack/puppet/templates/prescript.pp
+++ b/packstack/puppet/templates/prescript.pp
@@ -10,7 +10,7 @@
}
# For older RHEL-6 releases kernel/iptools does not support netns
-if $::operatingsystem in $el_releases and $::operatingsystemrelease < 7 {
+if $::operatingsystem in $el_releases and $::operatingsystemmajrelease < 7 {
$info = "The RDO kernel that includes network namespace (netns) support has been installed on host $::ipaddress."
$warning = " This is a community supplied kernel and is not officially supported by Red Hat. Installing this kernel on RHEL systems may impact your ability to get support from Red Hat."