summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--puppet/modules/site_config/manifests/default.pp3
-rw-r--r--puppet/modules/site_config/manifests/packages/base.pp4
-rw-r--r--puppet/modules/site_config/manifests/params.pp4
3 files changed, 8 insertions, 3 deletions
diff --git a/puppet/modules/site_config/manifests/default.pp b/puppet/modules/site_config/manifests/default.pp
index a645cb1a..c7243d5f 100644
--- a/puppet/modules/site_config/manifests/default.pp
+++ b/puppet/modules/site_config/manifests/default.pp
@@ -2,6 +2,7 @@ class site_config::default {
tag 'leap_base'
$domain_hash = hiera('domain')
+ include site_config::params
# make sure apt is updated before any packages are installed
include apt::update
@@ -32,7 +33,7 @@ class site_config::default {
include site_config::dhclient
}
- if ( $::virtual == 'virtualbox' ) {
+ if ( $::site_config::params::environment == 'local' ) {
include site_config::vagrant
}
diff --git a/puppet/modules/site_config/manifests/packages/base.pp b/puppet/modules/site_config/manifests/packages/base.pp
index 94ff679b..3e1d4a67 100644
--- a/puppet/modules/site_config/manifests/packages/base.pp
+++ b/puppet/modules/site_config/manifests/packages/base.pp
@@ -1,5 +1,7 @@
class site_config::packages::base {
+ include site_config::params
+
# base set of packages that we want to have installed everywhere
package { [ 'etckeeper', 'screen', 'less' ]:
ensure => installed,
@@ -15,7 +17,7 @@ class site_config::packages::base {
ensure => absent;
}
- if $::virtual == 'virtualbox' or $::services =~ /\bwebapp\b/ {
+ if $::site_config::params::environment == 'local' or $::services =~ /\bwebapp\b/ {
$dev_packages_ensure = present
} else {
$dev_packages_ensure = absent
diff --git a/puppet/modules/site_config/manifests/params.pp b/puppet/modules/site_config/manifests/params.pp
index 59a161e8..2ef391db 100644
--- a/puppet/modules/site_config/manifests/params.pp
+++ b/puppet/modules/site_config/manifests/params.pp
@@ -3,8 +3,10 @@ class site_config::params {
$ip_address = hiera('ip_address')
$ip_address_interface = getvar("interface_${ip_address}")
$ec2_local_ipv4_interface = getvar("interface_${::ec2_local_ipv4}")
+ $environment = hiera('environment')
- if $::virtual == 'virtualbox' {
+
+ if $environment == 'local' {
$interface = 'eth1'
}
elsif hiera('interface','') != '' {