summaryrefslogtreecommitdiff
path: root/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'puppet')
-rw-r--r--puppet/modules/site_config/manifests/default.pp6
-rw-r--r--puppet/modules/site_config/manifests/packages.pp31
-rw-r--r--puppet/modules/site_config/manifests/packages/base.pp25
-rw-r--r--puppet/modules/site_config/manifests/packages/build_essential.pp25
-rw-r--r--puppet/modules/site_config/manifests/packages/uninstall.pp16
-rw-r--r--puppet/modules/site_nickserver/manifests/init.pp7
6 files changed, 56 insertions, 54 deletions
diff --git a/puppet/modules/site_config/manifests/default.pp b/puppet/modules/site_config/manifests/default.pp
index 4e297026..7a2a0a79 100644
--- a/puppet/modules/site_config/manifests/default.pp
+++ b/puppet/modules/site_config/manifests/default.pp
@@ -10,7 +10,6 @@ class site_config::default {
# make sure apt is updated before any packages are installed
include apt::update
Package { require => Exec['apt_updated'] }
- include site_config::packages::uninstall
include site_config::slow
@@ -28,7 +27,10 @@ class site_config::default {
# i.e. openstack/aws nodes, vagrant nodes
# fix dhclient from changing resolver information
+ # facter returns 'true' as string
+ # lint:ignore:quoted_booleans
if $::dhcp_enabled == 'true' {
+ # lint:endignore
include site_config::dhclient
}
@@ -45,7 +47,7 @@ class site_config::default {
include haveged
# install/remove base packages
- include site_config::packages::base
+ include site_config::packages
# include basic shorewall config
include site_shorewall::defaults
diff --git a/puppet/modules/site_config/manifests/packages.pp b/puppet/modules/site_config/manifests/packages.pp
new file mode 100644
index 00000000..4cd45bc9
--- /dev/null
+++ b/puppet/modules/site_config/manifests/packages.pp
@@ -0,0 +1,31 @@
+# install default packages and remove unwanted packages
+class site_config::packages {
+
+
+ # base set of packages that we want to have installed everywhere
+ package { [ 'etckeeper', 'screen', 'less', 'ntp' ]:
+ ensure => installed,
+ }
+
+ # base set of packages that we want to remove everywhere
+ package { [
+ 'acpi', 'build-essential',
+ 'cpp', 'cpp-4.6', 'cpp-4.7', 'cpp-4.8', 'cpp-4.9',
+ 'eject', 'ftp',
+ 'g++', 'g++-4.6', 'g++-4.7', 'g++-4.8', 'g++-4.9',
+ 'gcc', 'gcc-4.6', 'gcc-4.7', 'gcc-4.8', 'gcc-4.9',
+ 'laptop-detect', 'libc6-dev', 'libssl-dev', 'lpr', 'make', 'portmap',
+ 'pppconfig', 'pppoe', 'pump', 'qstat',
+ 'samba-common', 'samba-common-bin', 'smbclient',
+ 'tcl8.5', 'tk8.5', 'os-prober', 'unzip', 'xauth', 'x11-common',
+ 'x11-utils', 'xterm' ]:
+ ensure => purged;
+ }
+
+ notice($::site_config::params::environment)
+ if $::site_config::params::environment != 'local' {
+ package { [ 'nfs-common', 'nfs-kernel-server', 'rpcbind' ]:
+ ensure => purged;
+ }
+ }
+}
diff --git a/puppet/modules/site_config/manifests/packages/base.pp b/puppet/modules/site_config/manifests/packages/base.pp
deleted file mode 100644
index b53a9364..00000000
--- a/puppet/modules/site_config/manifests/packages/base.pp
+++ /dev/null
@@ -1,25 +0,0 @@
-# install default packages and remove unwanted packages
-class site_config::packages::base {
-
-
- # base set of packages that we want to have installed everywhere
- package { [ 'etckeeper', 'screen', 'less', 'ntp' ]:
- ensure => installed,
- }
-
- # base set of packages that we want to remove everywhere
- package { [ 'acpi', 'eject', 'ftp', 'laptop-detect', 'lpr',
- 'portmap', 'pppconfig', 'pppoe', 'pump', 'qstat',
- 'samba-common', 'samba-common-bin', 'smbclient', 'tcl8.5',
- 'tk8.5', 'os-prober', 'unzip', 'xauth', 'x11-common',
- 'x11-utils', 'xterm' ]:
- ensure => absent;
- }
-
- notice($::site_config::params::environment)
- if $::site_config::params::environment != 'local' {
- package { [ 'nfs-common', 'nfs-kernel-server', 'rpcbind' ]:
- ensure => purged;
- }
- }
-}
diff --git a/puppet/modules/site_config/manifests/packages/build_essential.pp b/puppet/modules/site_config/manifests/packages/build_essential.pp
index 8f3b2641..2b3e13b9 100644
--- a/puppet/modules/site_config/manifests/packages/build_essential.pp
+++ b/puppet/modules/site_config/manifests/packages/build_essential.pp
@@ -1,11 +1,28 @@
#
# include this whenever you want to ensure build-essential package and related compilers are installed.
#
-class site_config::packages::build_essential {
- if !defined(Package['build-essential']) {
- package {
- ['build-essential', 'cpp']:
+class site_config::packages::build_essential inherits ::site_config::packages {
+
+ # NICKSERVER CODE NOTE: in order to support TLS, libssl-dev must be installed
+ # before EventMachine gem is built/installed.
+ Package[ 'gcc', 'make', 'g++', 'cpp', 'libssl-dev', 'libc6-dev' ] {
+ ensure => present
+ }
+
+ case $::operatingsystemrelease {
+ /^8.*/: {
+ Package[ 'gcc-4.9','g++-4.9', 'cpp-4.9' ] {
+ ensure => present
+ }
+ }
+
+ /^7.*/: {
+ Package[ 'gcc-4.7','g++-4.7', 'cpp-4.7' ] {
ensure => present
+ }
}
+
+ default: { }
}
+
}
diff --git a/puppet/modules/site_config/manifests/packages/uninstall.pp b/puppet/modules/site_config/manifests/packages/uninstall.pp
deleted file mode 100644
index 12f527d9..00000000
--- a/puppet/modules/site_config/manifests/packages/uninstall.pp
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Uninstall build-essential and compilers, unless they have been explicitly installed elsewhere.
-#
-class site_config::packages::uninstall {
- tag 'leap_base'
-
- # generally, dev packages are needed for installing ruby gems with native extensions.
- # (nickserver, webapp, etc)
-
- if !defined(Package['build-essential']) {
- package {
- ['build-essential', 'g++', 'g++-4.7', 'gcc', 'gcc-4.6', 'gcc-4.7', 'cpp', 'cpp-4.6', 'cpp-4.7', 'libc6-dev']:
- ensure => purged
- }
- }
-} \ No newline at end of file
diff --git a/puppet/modules/site_nickserver/manifests/init.pp b/puppet/modules/site_nickserver/manifests/init.pp
index 0e585e10..eb4415e7 100644
--- a/puppet/modules/site_nickserver/manifests/init.pp
+++ b/puppet/modules/site_nickserver/manifests/init.pp
@@ -61,13 +61,6 @@ class site_nickserver {
require => Group['nickserver'];
}
- #
- # NICKSERVER CODE NOTE: in order to support TLS, libssl-dev must be installed
- # before EventMachine gem is built/installed.
- #
-
- package { 'libssl-dev': ensure => installed }
-
vcsrepo { '/srv/leap/nickserver':
ensure => present,
revision => $sources['nickserver']['revision'],