diff options
author | varac <varacanero@zeromail.org> | 2013-09-17 18:52:36 +0200 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2013-09-17 18:52:36 +0200 |
commit | a9296de31af36dcedcc930052d2c589b6d77b149 (patch) | |
tree | 7b8da54b54b42c943cf132fb4a020654b419fd15 /puppet/modules | |
parent | c5d4a716ffc8bad1a0a634438245eb02452ed43d (diff) | |
parent | 5ca8f6f9d26a2c2abfa9f1752aad6b8d91020074 (diff) |
Merge branch 'feature/2399_shorewall_on_vagrant_fails' into develop
Diffstat (limited to 'puppet/modules')
-rw-r--r-- | puppet/modules/site_config/manifests/default.pp | 7 | ||||
-rw-r--r-- | puppet/modules/site_config/manifests/params.pp | 4 | ||||
-rw-r--r-- | puppet/modules/site_config/manifests/vagrant.pp | 10 |
3 files changed, 19 insertions, 2 deletions
diff --git a/puppet/modules/site_config/manifests/default.pp b/puppet/modules/site_config/manifests/default.pp index b315044a..83a344a2 100644 --- a/puppet/modules/site_config/manifests/default.pp +++ b/puppet/modules/site_config/manifests/default.pp @@ -15,11 +15,18 @@ class site_config::default { # configure ssh and include ssh-keys include site_config::sshd + # include classes for special environments + # i.e. openstack/aws nodes, vagrant nodes + # fix dhclient from changing resolver information if $::ec2_instance_id { include site_config::dhclient } + if ( $::virtual == 'virtualbox' ) { + include site_config::vagrant + } + # configure /etc/resolv.conf include site_config::resolvconf diff --git a/puppet/modules/site_config/manifests/params.pp b/puppet/modules/site_config/manifests/params.pp index 20697042..a4657457 100644 --- a/puppet/modules/site_config/manifests/params.pp +++ b/puppet/modules/site_config/manifests/params.pp @@ -5,7 +5,7 @@ class site_config::params { $ec2_local_ipv4_interface = getvar("interface_${::ec2_local_ipv4}") if $::virtual == 'virtualbox' { - $interface = [ 'eth0', 'eth1' ] + $interface = 'eth1' } elsif hiera('interface','') != '' { $interface = hiera('interface') @@ -17,7 +17,7 @@ class site_config::params { $interface = $ec2_local_ipv4_interface } elsif $::interfaces =~ /eth0/ { - $interface = eth0 + $interface = 'eth0' } else { fail("unable to determine a valid interface, please set a valid interface for this node in nodes/${::hostname}.json") diff --git a/puppet/modules/site_config/manifests/vagrant.pp b/puppet/modules/site_config/manifests/vagrant.pp new file mode 100644 index 00000000..04266735 --- /dev/null +++ b/puppet/modules/site_config/manifests/vagrant.pp @@ -0,0 +1,10 @@ +class site_config::vagrant { + # class for vagrant nodes + + # eth0 on vagrant nodes is the uplink if + shorewall::interface { 'eth0': + zone => 'net', + options => 'tcpflags,blacklist,nosmurfs'; + } + +} |