Skip to content

Commit 6e88b1f

Browse files
committed
Replace operatingsystemrelease with os.release.full
1 parent 222c044 commit 6e88b1f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

manifests/params.pp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@
4141
'RedHat': {
4242
case $facts['os']['name'] {
4343
'Fedora': {
44-
if versioncmp($::operatingsystemrelease, '19') >= 0 or $::operatingsystemrelease == 'Rawhide' {
44+
if versioncmp($facts['os']['release']['full'], '19') >= 0 or $facts['os']['release']['full'] == 'Rawhide' {
4545
$provider = 'mariadb'
4646
} else {
4747
$provider = 'mysql'
4848
}
4949
$python_package_name = 'MySQL-python'
5050
}
5151
'Amazon': {
52-
if versioncmp($::operatingsystemrelease, '2') >= 0 {
52+
if versioncmp($facts['os']['release']['full'], '2') >= 0 {
5353
$provider = 'mariadb'
5454
} else {
5555
$provider = 'mysql'
@@ -207,26 +207,26 @@
207207
$managed_dirs = ['tmpdir','basedir','datadir','innodb_data_home_dir','innodb_log_group_home_dir','innodb_undo_directory','innodb_tmpdir']
208208

209209
# mysql::bindings
210-
if ($facts['os']['name'] == 'Debian' and versioncmp($::operatingsystemrelease, '10') >= 0) or
211-
($facts['os']['name'] == 'Ubuntu' and versioncmp($::operatingsystemrelease, '20.04') >= 0) {
210+
if ($facts['os']['name'] == 'Debian' and versioncmp($facts['os']['release']['full'], '10') >= 0) or
211+
($facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['full'], '20.04') >= 0) {
212212
$java_package_name = 'libmariadb-java'
213213
} else {
214214
$java_package_name = 'libmysql-java'
215215
}
216216
$perl_package_name = 'libdbd-mysql-perl'
217-
if ($facts['os']['name'] == 'Ubuntu' and versioncmp($::operatingsystemrelease, '16.04') >= 0) or
217+
if ($facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['full'], '16.04') >= 0) or
218218
($facts['os']['name'] == 'Debian') {
219219
$php_package_name = 'php-mysql'
220220
} else {
221221
$php_package_name = 'php5-mysql'
222222
}
223-
if ($facts['os']['name'] == 'Ubuntu' and versioncmp($::operatingsystemrelease, '16.04') < 0) or
224-
($facts['os']['name'] == 'Ubuntu' and versioncmp($::operatingsystemrelease, '20.04') >= 0) or
223+
if ($facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['full'], '16.04') < 0) or
224+
($facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['full'], '20.04') >= 0) or
225225
($facts['os']['name'] == 'Debian') {
226226
$xtrabackup_package_name = 'percona-xtrabackup-24'
227227
}
228-
if ($facts['os']['name'] == 'Ubuntu' and versioncmp($::operatingsystemrelease, '20.04') >= 0) or
229-
($facts['os']['name'] == 'Debian' and versioncmp($::operatingsystemrelease, '11') >= 0) {
228+
if ($facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['full'], '20.04') >= 0) or
229+
($facts['os']['name'] == 'Debian' and versioncmp($facts['os']['release']['full'], '11') >= 0) {
230230
$python_package_name = 'python3-mysqldb'
231231
} else {
232232
$python_package_name = 'python-mysqldb'

0 commit comments

Comments
 (0)