summaryrefslogtreecommitdiff
path: root/puppet/modules/site_config/manifests
diff options
context:
space:
mode:
authorkwadronaut <kwadronaut@leap.se>2014-04-06 00:54:21 +0200
committerkwadronaut <kwadronaut@leap.se>2014-04-06 00:54:21 +0200
commitb8dc78db9a8e3e36a7378fba3408b45baca6bec3 (patch)
treed83817d97241bae3aba897143e5150b1f5117f74 /puppet/modules/site_config/manifests
parent75c4fb003d1a37f7c7a7c0aa726292aba27fd1e6 (diff)
parentbafcfdf7643bcfa5715b5517578e0d9ca2eb399e (diff)
better system for optionally uninstalling build-essential package closes https://leap.se/code/issues/5426 Merge branch 'bugfix/buildessential' of https://github.com/elijh/leap_platform into elijh-bugfix/buildessential
Diffstat (limited to 'puppet/modules/site_config/manifests')
-rw-r--r--puppet/modules/site_config/manifests/packages/build_essential.pp7
-rw-r--r--puppet/modules/site_config/manifests/packages/uninstall.pp18
2 files changed, 12 insertions, 13 deletions
diff --git a/puppet/modules/site_config/manifests/packages/build_essential.pp b/puppet/modules/site_config/manifests/packages/build_essential.pp
index c9efaafb..7dfb8b03 100644
--- a/puppet/modules/site_config/manifests/packages/build_essential.pp
+++ b/puppet/modules/site_config/manifests/packages/build_essential.pp
@@ -2,7 +2,10 @@
# include this whenever you want to ensure build-essential package and related compilers are installed.
#
class site_config::packages::build_essential {
- if $install_build_essential == undef {
- $install_build_essential = true
+ 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 => present
+ }
}
} \ No newline at end of file
diff --git a/puppet/modules/site_config/manifests/packages/uninstall.pp b/puppet/modules/site_config/manifests/packages/uninstall.pp
index 2919cc96..12f527d9 100644
--- a/puppet/modules/site_config/manifests/packages/uninstall.pp
+++ b/puppet/modules/site_config/manifests/packages/uninstall.pp
@@ -1,20 +1,16 @@
#
-# this should be included last to allow other modules to set $::install_build_packages
+# Uninstall build-essential and compilers, unless they have been explicitly installed elsewhere.
#
class site_config::packages::uninstall {
-
- if $site_config::packages::build_essential::install_essential == true {
- $dev_packages_ensure = present
- } else {
- $dev_packages_ensure = absent
- }
+ tag 'leap_base'
# generally, dev packages are needed for installing ruby gems with native extensions.
# (nickserver, webapp, etc)
- package { [ 'build-essential', 'g++', 'g++-4.7', 'gcc',
- 'gcc-4.6', 'gcc-4.7', 'cpp', 'cpp-4.6', 'cpp-4.7', 'libc6-dev' ]:
- ensure => $dev_packages_ensure
+ 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