Skip to content

Commit fa0a4fb

Browse files
committed
Merge pull request voxpupuli#12 from tbartelmess/master
Support for CentOS and RedHat Linux
2 parents 2f91e32 + 83c9847 commit fa0a4fb

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

manifests/init.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
) {
3838

3939
# Module compatibility check
40-
$compatible = [ 'Debian', 'Ubuntu' ]
40+
$compatible = [ 'Debian', 'Ubuntu', 'CentOS', 'RedHat' ]
4141
if ! ($::operatingsystem in $compatible) {
4242
fail("Module is not compatible with ${::operatingsystem}")
4343
}

manifests/install.pp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,19 @@
55
default => "python${python::version}",
66
}
77

8+
$pythondev = $::operatingsystem ? {
9+
'RedHat', 'CentOS', 'Fedora' => "$python-devel",
10+
'Debian', 'Ubuntu' => "$python-dev"
11+
}
12+
813
package { $python: ensure => present }
914

1015
$dev_ensure = $python::dev ? {
1116
true => present,
1217
default => absent,
1318
}
1419

15-
package { [ "${python}-dev", 'python-pip' ]: ensure => $dev_ensure }
20+
package { [ $pythondev, 'python-pip' ]: ensure => $dev_ensure }
1621

1722
$venv_ensure = $python::virtualenv ? {
1823
true => present,

0 commit comments

Comments
 (0)