diff --git a/manifests/params.pp b/manifests/params.pp index f96ca3c..558cf90 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -33,6 +33,19 @@ class jenkins::params { $cgred_require = Package['cgroups'] } } + 'Suse': { + $jdk_package = 'java-1_8_0-openjdk-devel' + $ccache_package = 'ccache' + $python_netaddr_package = 'python-netaddr' + $cgroups_package = 'libcgroup1' + $cgroups_tools_package = 'libcgroup-tools' + $cgconfig_require = [ + Package['libcgroup-tools'] + ] + $cgred_require = [ + Package['libcgroup-tools'] + ] + } 'Debian': { # common packages $ccache_package = 'ccache' @@ -66,7 +79,7 @@ class jenkins::params { } } default: { - fail("Unsupported osfamily: ${::osfamily} The 'jenkins' module only supports osfamily Debian or RedHat (slaves only).") + fail("Unsupported osfamily: ${::osfamily} The 'jenkins' module only supports osfamily Debian, RedHat or Suse (slaves only).") } } } diff --git a/manifests/slave.pp b/manifests/slave.pp index a23ade7..bfcddcc 100644 --- a/manifests/slave.pp +++ b/manifests/slave.pp @@ -62,6 +62,13 @@ class jenkins::slave( } } } + 'Suse': { + exec { 'zypper devel pattern install': + unless => '/usr/bin/zypper -n info -t pattern devel_basis | /bin/grep -q "Installed.*yes"', + command => '/usr/bin/zypper -n in -t pattern devel_basis', + timeout => 1800, + } + } 'Debian': { # install build-essential package group package { 'build-essential': @@ -95,7 +102,7 @@ class jenkins::slave( } } default: { - fail("Unsupported osfamily: ${::osfamily} The 'jenkins' module only supports osfamily Debian or RedHat (slaves only).") + fail("Unsupported osfamily: ${::osfamily} The 'jenkins' module only supports osfamily Debian, RedHat or Suse (slaves only).") } } diff --git a/templates/cgconfig.erb b/templates/cgconfig.erb index 1e6d9a1..01fb0b5 100644 --- a/templates/cgconfig.erb +++ b/templates/cgconfig.erb @@ -1,6 +1,9 @@ <% if @operatingsystem == "Fedora" then # Fedora auto-mounts subsystems under /sys/fs/cgroup/ already, so no # mount section is needed. %> +<% elsif @operatingsystem == "Suse" then +# SUSE auto-mounts subsystems under /sys/fs/cgroup/ already, so no +# mount section is needed. %> <% elsif @osfamily == "RedHat" then %> mount {