diff options
author | Christoph Kluenter <ckluente@thoughtworks.com> | 2014-12-04 12:09:10 +0100 |
---|---|---|
committer | Christoph Kluenter <ckluente@thoughtworks.com> | 2014-12-04 12:09:10 +0100 |
commit | d063e35d3e29b3cedc810b8e5ca1855c841d8f9e (patch) | |
tree | 06e5110632156a35e6e879a9fa0455edf62f05bf /puppet/modules/site_tor | |
parent | 664dca31dec0c7935ee96359209d9dcefc03e38c (diff) | |
parent | de51b83384d97a67cdbdf1992ba9ad771a292c5d (diff) |
Merge remote-tracking branch 'leap/develop' into check_dhcp
Diffstat (limited to 'puppet/modules/site_tor')
-rw-r--r-- | puppet/modules/site_tor/manifests/init.pp | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/puppet/modules/site_tor/manifests/init.pp b/puppet/modules/site_tor/manifests/init.pp index e62cb12d..d14e813d 100644 --- a/puppet/modules/site_tor/manifests/init.pp +++ b/puppet/modules/site_tor/manifests/init.pp @@ -11,23 +11,31 @@ class site_tor { $address = hiera('ip_address') + $openvpn = hiera('openvpn', undef) + if $openvpn { + $openvpn_ports = $openvpn['ports'] + } + else { + $openvpn_ports = [] + } + class { 'tor::daemon': } tor::daemon::relay { $nickname: - port => 9001, - address => $address, - contact_info => obfuscate_email($contact_emails), - bandwidth_rate => $bandwidth_rate, - my_family => $family + port => 9001, + address => $address, + contact_info => obfuscate_email($contact_emails), + bandwidth_rate => $bandwidth_rate, + my_family => $family } if ( $tor_type == 'exit'){ - tor::daemon::directory { $::hostname: port => 80 } + # Only enable the daemon directory if the node isn't also a webapp node + # or running openvpn on port 80 + if ! member($::services, 'webapp') and ! member($openvpn_ports, '80') { + tor::daemon::directory { $::hostname: port => 80 } + } } else { - tor::daemon::directory { $::hostname: - port => 80, - port_front_page => ''; - } include site_tor::disable_exit } |