Use facter's osfamily instead of operatingsystem.
The osfamily fact is more flexible when we want to support more GNU/Linux distributions while avoiding unnecessary code duplication. Change-Id: Iea4c73c19e7f94df8daccf25c764b6a4539a1ea0 Reviewed-on: https://review.openstack.org/27400 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:
parent
669eb287c9
commit
3089973311
@ -28,9 +28,9 @@ class jenkins::cgroups {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Starting with Ubuntu Quantal (12.10) cgroup-bin dropped its upstart jobs.
|
# Starting with Ubuntu Quantal (12.10) cgroup-bin dropped its upstart jobs.
|
||||||
if $::operatingsystem == 'Ubuntu' {
|
if $::osfamily == 'Debian' {
|
||||||
|
|
||||||
if $::operatingsystemrelease >= '12.10' {
|
if $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease >= '12.10' {
|
||||||
|
|
||||||
file { '/etc/init/cgconfig.conf':
|
file { '/etc/init/cgconfig.conf':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
|
@ -69,7 +69,7 @@ class jenkins::jenkinsuser(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#NOTE: not all distributions have default bash files in /etc/skel
|
#NOTE: not all distributions have default bash files in /etc/skel
|
||||||
if ($::operatingsystem == 'Ubuntu') {
|
if ($::osfamily == 'Debian') {
|
||||||
|
|
||||||
file { '/home/jenkins/.bashrc':
|
file { '/home/jenkins/.bashrc':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
|
@ -289,7 +289,7 @@ class jenkins::slave(
|
|||||||
# Temporary for debugging glance launch problem
|
# Temporary for debugging glance launch problem
|
||||||
# https://lists.launchpad.net/openstack/msg13381.html
|
# https://lists.launchpad.net/openstack/msg13381.html
|
||||||
# NOTE(dprince): ubuntu only as RHEL6 doesn't have sysctl.d yet
|
# NOTE(dprince): ubuntu only as RHEL6 doesn't have sysctl.d yet
|
||||||
if ($::operatingsystem == 'Ubuntu') {
|
if ($::osfamily == 'Debian') {
|
||||||
|
|
||||||
file { '/etc/sysctl.d/10-ptrace.conf':
|
file { '/etc/sysctl.d/10-ptrace.conf':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
class openstack_project::automatic_upgrades (
|
class openstack_project::automatic_upgrades (
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if $::operatingsystem == 'Ubuntu' {
|
if $::osfamily == 'Debian' {
|
||||||
include unattended_upgrades
|
include unattended_upgrades
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ class openstack_project::base(
|
|||||||
$certname = $::fqdn,
|
$certname = $::fqdn,
|
||||||
$install_users = true
|
$install_users = true
|
||||||
) {
|
) {
|
||||||
if ($::operatingsystem == 'Ubuntu') {
|
if ($::osfamily == 'Debian') {
|
||||||
include apt
|
include apt
|
||||||
}
|
}
|
||||||
include openstack_project::params
|
include openstack_project::params
|
||||||
@ -56,7 +56,7 @@ class openstack_project::base(
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Use upstream puppet and pin to version 2.7.*
|
# Use upstream puppet and pin to version 2.7.*
|
||||||
if ($::operatingsystem == 'Ubuntu') {
|
if ($::osfamily == 'Debian') {
|
||||||
apt::source { 'puppetlabs':
|
apt::source { 'puppetlabs':
|
||||||
location => 'http://apt.puppetlabs.com',
|
location => 'http://apt.puppetlabs.com',
|
||||||
repos => 'main',
|
repos => 'main',
|
||||||
|
@ -18,8 +18,8 @@ class openstack_project::server (
|
|||||||
sysadmin => $sysadmins,
|
sysadmin => $sysadmins,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Custom rsyslog config to disable /dev/xconsole noise on Ubuntu servers
|
# Custom rsyslog config to disable /dev/xconsole noise on Debuntu servers
|
||||||
if $::operatingsystem == 'Ubuntu' {
|
if $::osfamily == 'Debian' {
|
||||||
file { '/etc/rsyslog.d/50-default.conf':
|
file { '/etc/rsyslog.d/50-default.conf':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
class openstack_project::tmpcleanup (
|
class openstack_project::tmpcleanup (
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if $::operatingsystem == 'Ubuntu' {
|
if $::osfamily == 'Debian' {
|
||||||
include tmpreaper
|
include tmpreaper
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ class salt (
|
|||||||
$salt_master = $::fqdn
|
$salt_master = $::fqdn
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if ($::operatingsystem == 'Ubuntu') {
|
if ($::osfamily == 'Debian') {
|
||||||
include apt
|
include apt
|
||||||
|
|
||||||
# Wrap in ! defined checks to allow minion and master installs on the
|
# Wrap in ! defined checks to allow minion and master installs on the
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
class salt::master {
|
class salt::master {
|
||||||
|
|
||||||
if ($::operatingsystem == 'Ubuntu') {
|
if ($::osfamily == 'Debian') {
|
||||||
include apt
|
include apt
|
||||||
|
|
||||||
# Wrap in ! defined checks to allow minion and master installs on the
|
# Wrap in ! defined checks to allow minion and master installs on the
|
||||||
|
@ -14,7 +14,7 @@ class snmpd {
|
|||||||
require => File['/etc/snmp/snmpd.conf']
|
require => File['/etc/snmp/snmpd.conf']
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($::operatingsystem == 'Ubuntu') {
|
if ($::osfamily == 'Debian') {
|
||||||
# This file is only needed on machines pre-precise. There is a bug in
|
# This file is only needed on machines pre-precise. There is a bug in
|
||||||
# the previous init script versions which causes them to attempt
|
# the previous init script versions which causes them to attempt
|
||||||
# snmptrapd even if it's configured not to run, and then to report
|
# snmptrapd even if it's configured not to run, and then to report
|
||||||
|
@ -16,7 +16,7 @@ class ssh {
|
|||||||
group => 'root',
|
group => 'root',
|
||||||
mode => '0444',
|
mode => '0444',
|
||||||
source => [
|
source => [
|
||||||
"puppet:///modules/ssh/sshd_config.${::operatingsystem}",
|
"puppet:///modules/ssh/sshd_config.${::osfamily}",
|
||||||
'puppet:///modules/ssh/sshd_config',
|
'puppet:///modules/ssh/sshd_config',
|
||||||
],
|
],
|
||||||
replace => true,
|
replace => true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user