diff options
-rw-r--r-- | manifests/init.pp | 2 | ||||
-rw-r--r-- | manifests/install.pp | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index c7ab10f..8e8de9e 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -37,7 +37,7 @@ class python ( ) { # Module compatibility check - $compatible = [ 'Debian', 'Ubuntu' ] + $compatible = [ 'Debian', 'Ubuntu', 'CentOS', 'RedHat' ] if ! ($::operatingsystem in $compatible) { fail("Module is not compatible with ${::operatingsystem}") } diff --git a/manifests/install.pp b/manifests/install.pp index e52e7e4..d2acec0 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -5,6 +5,11 @@ class python::install { default => "python${python::version}", } + $pythondev = $::operatingsystem ? { + 'RedHat', 'CentOS', 'Fedora' => "$python-devel", + 'Debian', 'Ubuntu' => "$python-dev" + } + package { $python: ensure => present } $dev_ensure = $python::dev ? { @@ -12,7 +17,7 @@ class python::install { default => absent, } - package { [ "${python}-dev", 'python-pip' ]: ensure => $dev_ensure } + package { [ $pythondev, 'python-pip' ]: ensure => $dev_ensure } $venv_ensure = $python::virtualenv ? { true => present, |