The facter osfamily of Ubuntu is Debian.

Clean up facter osfamily matches to just use Debian, not Ubuntu.
This is manually tested and confirmed to at least be the case on
Oneiric, Precise and Quantal.

Change-Id: I27b184ac419910f9c3271c3b4e57886333282a5f
Reviewed-on: https://review.openstack.org/27399
Reviewed-by: Spencer Krum <krum.spencer@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
This commit is contained in:
Jeremy Stanley 2013-04-24 02:42:55 +00:00 committed by Jenkins
parent ae3dfe4d95
commit 669eb287c9
9 changed files with 38 additions and 33 deletions

View File

@ -10,14 +10,14 @@ class exim::params {
$config_file = '/etc/exim/exim.conf'
$conf_dir = '/etc/exim/'
}
'Debian', 'Ubuntu': {
'Debian': {
$package = 'exim4-daemon-light'
$service_name = 'exim4'
$config_file = '/etc/exim4/exim4.conf'
$conf_dir = '/etc/exim4'
}
default: {
fail("Unsupported osfamily: ${::osfamily} The 'exim' module only supports osfamily Ubuntu or Redhat(slaves only).")
fail("Unsupported osfamily: ${::osfamily} The 'exim' module only supports osfamily Debian or RedHat (slaves only).")
}
}
}

View File

@ -14,7 +14,7 @@ class iptables::params {
$service_status_cmd = undef
$service_has_restart = false
}
'Debian', 'Ubuntu': {
'Debian': {
$package_name = 'iptables-persistent'
$service_name = 'iptables-persistent'
$rules_dir = '/etc/iptables'
@ -32,7 +32,7 @@ class iptables::params {
$service_has_restart = false
}
default: {
fail("Unsupported osfamily: ${::osfamily} The 'iptables' module only supports osfamily Ubuntu or Redhat(slaves only).")
fail("Unsupported osfamily: ${::osfamily} The 'iptables' module only supports osfamily Debian or RedHat (slaves only).")
}
}
}

View File

@ -47,7 +47,7 @@ class jenkins::params {
$cgconfig_require = Package['cgroups']
$cgred_require = Package['cgroups']
}
'Debian', 'Ubuntu': {
'Debian': {
# common packages
$jdk_package = 'default-jdk'
$ccache_package = 'ccache'
@ -94,7 +94,7 @@ class jenkins::params {
]
}
default: {
fail("Unsupported osfamily: ${::osfamily} The 'jenkins' module only supports osfamily Ubuntu or Redhat(slaves only).")
fail("Unsupported osfamily: ${::osfamily} The 'jenkins' module only supports osfamily Debian or RedHat (slaves only).")
}
}
}

View File

@ -66,29 +66,34 @@ class jenkins::slave(
ensure => present,
}
if ($::osfamily == 'RedHat') {
case $::osfamily {
'RedHat': {
exec { 'yum Group Install':
unless => '/usr/bin/yum grouplist "Development tools" | /bin/grep "^Installed Groups"',
command => '/usr/bin/yum -y groupinstall "Development tools"',
}
exec { 'yum Group Install':
unless => '/usr/bin/yum grouplist "Development tools" | /bin/grep "^Installed Groups"',
command => '/usr/bin/yum -y groupinstall "Development tools"',
}
'Debian': {
}
if ($::operatingsystem == 'Ubuntu') {
# install build-essential package group
package { 'build-essential':
ensure => present,
}
package { $::jenkins::params::maven_package:
ensure => present,
}
package { $::jenkins::params::python3_dev_package:
ensure => present,
}
# install build-essential package group
package { 'build-essential':
ensure => present,
}
package { $::jenkins::params::maven_package:
ensure => present,
default: {
fail("Unsupported osfamily: ${::osfamily} The 'jenkins' module only supports osfamily Debian or RedHat (slaves only).")
}
package { $::jenkins::params::python3_dev_package:
ensure => present,
}
}
if ($bare == false) {

View File

@ -9,13 +9,13 @@ class openstack_project::params {
$user_packages = ['byobu', 'emacs-nox']
$update_pkg_list_cmd = ''
}
'Debian', 'Ubuntu': {
'Debian': {
$packages = ['puppet', 'python-setuptools', 'wget']
$user_packages = ['byobu', 'emacs23-nox']
$update_pkg_list_cmd = 'apt-get update >/dev/null 2>&1;'
}
default: {
fail("Unsupported osfamily: ${::osfamily} The 'openstack_project' module only supports osfamily Ubuntu or Redhat(slaves only).")
fail("Unsupported osfamily: ${::osfamily} The 'openstack_project' module only supports osfamily Debian or RedHat (slaves only).")
}
}
}

View File

@ -8,12 +8,12 @@ class pip::params {
$python_devel_package = 'python-devel'
$python_pip_package = 'python-pip'
}
'Debian', 'Ubuntu': {
'Debian': {
$python_devel_package = 'python-all-dev'
$python_pip_package = 'python-pip'
}
default: {
fail("Unsupported osfamily: ${::osfamily} The 'pip' module only supports osfamily Fedora, Redhat, Debian, or Ubuntu.")
fail("Unsupported osfamily: ${::osfamily} The 'pip' module only supports osfamily Debian or RedHat.")
}
}
}

View File

@ -7,11 +7,11 @@ class snmpd::params {
'RedHat': {
$package_name = 'net-snmp'
}
'Debian', 'Ubuntu': {
'Debian': {
$package_name = 'snmpd'
}
default: {
fail("Unsupported osfamily: ${::osfamily} The 'snmpd' module only supports osfamily Ubuntu or Redhat(slaves only).")
fail("Unsupported osfamily: ${::osfamily} The 'snmpd' module only supports osfamily Debian or RedHat (slaves only).")
}
}
}

View File

@ -8,12 +8,12 @@ class ssh::params {
$package_name = 'openssh-server'
$service_name = 'sshd'
}
'Debian', 'Ubuntu': {
'Debian': {
$package_name = 'openssh-server'
$service_name = 'ssh'
}
default: {
fail("Unsupported osfamily: ${::osfamily} The 'ssh' module only supports osfamily Ubuntu or Redhat(slaves only).")
fail("Unsupported osfamily: ${::osfamily} The 'ssh' module only supports osfamily Debian or RedHat (slaves only).")
}
}
}

View File

@ -7,11 +7,11 @@ class ulimit::params {
'RedHat': {
$pam_packages = ['pam']
}
'Debian', 'Ubuntu': {
'Debian': {
$pam_packages = ['libpam-modules', 'libpam-modules-bin']
}
default: {
fail("Unsupported osfamily: ${::osfamily} The 'ulimit' module only supports osfamily Fedora, Redhat, Debian, or Ubuntu.")
fail("Unsupported osfamily: ${::osfamily} The 'ulimit' module only supports osfamily Debian or RedHat.")
}
}
}