diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2012-06-20 23:24:30 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2012-06-20 23:24:30 -0300 |
commit | 89d3242cc7d4607f5eb8f1df39985c3597ee428d (patch) | |
tree | 13d7920ebfd696dac5daff74f48fff64c248efc5 | |
parent | 82e864d6ee95e5fdbe0db973217f575e09a36e8f (diff) | |
download | puppet-tor-89d3242cc7d4607f5eb8f1df39985c3597ee428d.tar.gz puppet-tor-89d3242cc7d4607f5eb8f1df39985c3597ee428d.tar.bz2 |
Adding support for MapAddress tor option
-rw-r--r-- | manifests/daemon.pp | 12 | ||||
-rw-r--r-- | templates/torrc.map_address.erb | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/manifests/daemon.pp b/manifests/daemon.pp index 6d8c315..d1d57df 100644 --- a/manifests/daemon.pp +++ b/manifests/daemon.pp @@ -184,5 +184,17 @@ class tor::daemon inherits tor { ensure => $ensure, } } + + # map address definition + define map_address( $address = '', + $newaddress = '') { + + concatenated_file_part { "08.map_address.${name}": + dir => $tor::daemon::snippet_dir, + content => template('tor/torrc.map_address.erb'), + owner => 'debian-tor', group => 'debian-tor', mode => 0644, + ensure => $ensure, + } + } } diff --git a/templates/torrc.map_address.erb b/templates/torrc.map_address.erb new file mode 100644 index 0000000..3fb0274 --- /dev/null +++ b/templates/torrc.map_address.erb @@ -0,0 +1,3 @@ +# map address <%= name %> +MapAddress <%= address %> <%= newaddress %> + |