diff options
author | mh <mh@immerda.ch> | 2014-04-18 11:10:16 +0200 |
---|---|---|
committer | mh <mh@immerda.ch> | 2014-04-18 11:10:16 +0200 |
commit | 5228a3d6bd2fce2e56bea538bd9c29641cf22474 (patch) | |
tree | 892e962bbd36915248545bf122810b4c2aa936fe | |
parent | 0a7fa2d5ec783a0c72dc2484c0e5958ec281db1f (diff) | |
download | puppet-tor-5228a3d6bd2fce2e56bea538bd9c29641cf22474.tar.gz puppet-tor-5228a3d6bd2fce2e56bea538bd9c29641cf22474.tar.bz2 |
address puppet 3.x deprecation warnings
-rw-r--r-- | templates/torrc.bridge.erb | 4 | ||||
-rw-r--r-- | templates/torrc.control.erb | 26 | ||||
-rw-r--r-- | templates/torrc.directory.erb | 12 | ||||
-rw-r--r-- | templates/torrc.dns.erb | 6 | ||||
-rw-r--r-- | templates/torrc.exit_policy.erb | 16 | ||||
-rw-r--r-- | templates/torrc.global.erb | 28 | ||||
-rw-r--r-- | templates/torrc.hidden_service.erb | 8 | ||||
-rw-r--r-- | templates/torrc.map_address.erb | 4 | ||||
-rw-r--r-- | templates/torrc.relay.erb | 86 | ||||
-rw-r--r-- | templates/torrc.socks.erb | 10 | ||||
-rw-r--r-- | templates/torrc.transparent.erb | 6 |
11 files changed, 103 insertions, 103 deletions
diff --git a/templates/torrc.bridge.erb b/templates/torrc.bridge.erb index 58ef70d..559ce5d 100644 --- a/templates/torrc.bridge.erb +++ b/templates/torrc.bridge.erb @@ -1,3 +1,3 @@ -# Bridge <%= name%> -Bridge <%= ip%>:<%= port%><%- if fingerprint -%> <%= fingerprint%><%- end -%> +# Bridge <%= @name %> +Bridge <%= @ip %>:<%= @port %><% if @fingerprint -%> <%= @fingerprint%><% end -%> diff --git a/templates/torrc.control.erb b/templates/torrc.control.erb index 336c72d..0b68faf 100644 --- a/templates/torrc.control.erb +++ b/templates/torrc.control.erb @@ -1,16 +1,16 @@ # tor controller -<%- if port != '0' then -%> -ControlPort <%= port %> -<%- if cookie_authentication != '0' then -%> +<% if @port != '0' -%> +ControlPort <%= @port %> +<% if @cookie_authentication != '0' -%> CookieAuthentication 1 -<%- if cookie_auth_file != '' then -%> -CookieAuthFile <%= cookie_auth_file %> -<%- end -%> -<%- if cookie_auth_file_group_readable != '' then -%> -CookieAuthFileGroupReadable <%= cookie_auth_file_group_readable %> -<%- end -%> -<%- else -%> -HashedControlPassword <%= hashed_control_password %> -<%- end -%> -<%- end -%> +<% if @cookie_auth_file != '' -%> +CookieAuthFile <%= @cookie_auth_file %> +<% end -%> +<% if @cookie_auth_file_group_readable != '' -%> +CookieAuthFileGroupReadable <%= @cookie_auth_file_group_readable %> +<% end -%> +<% else -%> +HashedControlPassword <%= @hashed_control_password %> +<% end -%> +<% end -%> diff --git a/templates/torrc.directory.erb b/templates/torrc.directory.erb index c6b35b5..1af9f40 100644 --- a/templates/torrc.directory.erb +++ b/templates/torrc.directory.erb @@ -1,11 +1,11 @@ # directory listing -<%- if port != '0' then -%> -DirPort <%= port %> -<%- end -%> -<%- for listen_address in listen_addresses -%> +<% if port != '0' -%> +DirPort <%= @port %> +<% end -%> +<% listen_addresses.each do |listen_address| -%> DirListenAddress <%= listen_address %> -<%- end -%> -<%- if port_front_page != '' then -%> +<% end -%> +<% if @port_front_page != '' -%> DirPortFrontPage <%= port_front_page %> <%- end -%> diff --git a/templates/torrc.dns.erb b/templates/torrc.dns.erb index bd1e719..57cf46d 100644 --- a/templates/torrc.dns.erb +++ b/templates/torrc.dns.erb @@ -1,5 +1,5 @@ # DNS -DNSPort <%= port %> -<%- for listen_address in listen_addresses -%> +DNSPort <%= @port %> +<% @listen_addresses.each do |listen_address| -%> DNSListenAddress <%= listen_address %> -<%- end -%> +<% end -%> diff --git a/templates/torrc.exit_policy.erb b/templates/torrc.exit_policy.erb index 65f9d09..a30d43b 100644 --- a/templates/torrc.exit_policy.erb +++ b/templates/torrc.exit_policy.erb @@ -1,11 +1,11 @@ -# exit policies: <%= name %> -<%- if reject_private != '1' then -%> -ExitPolicyRejectPrivate <%= reject_private %> -<%- end -%> -<%- for policy in accept -%> +# exit policies: <%= @name %> +<% if @reject_private != '1' -%> +ExitPolicyRejectPrivate <%= @reject_private %> +<% end -%> +<% @accept.each do |policy| -%> ExitPolicy accept <%= policy %> -<%- end -%> -<%- for policy in reject -%> +<% end -%> +<% @reject.each do |policy| -%> ExitPolicy reject <%= policy %> -<%- end -%> +<% end -%> diff --git a/templates/torrc.global.erb b/templates/torrc.global.erb index e0f6f7e..c320bfa 100644 --- a/templates/torrc.global.erb +++ b/templates/torrc.global.erb @@ -1,21 +1,21 @@ # runtime RunAsDaemon 1 -<%- if scope.lookupvar('tor::daemon::data_dir') != '/var/lib/tor' then -%> -DataDirectory <%= scope.lookupvar('tor::daemon::data_dir') %> -<%- end -%> +<% if (v=scope.lookupvar('tor::daemon::data_dir')) != '/var/lib/tor' -%> +DataDirectory <%= v %> +<% end -%> # log -<%- if scope.lookupvar('tor::daemon::log_rules') != [] then -%> -<%- for log_rule in scope.lookupvar('tor::daemon::log_rules') -%> -Log <%= log_rule %> -<%- end -%> -<%- else -%> +<% if (rules=scope.lookupvar('tor::daemon::log_rules')).empty? -%> Log notice syslog -<%- end -%> +<% else -%> +<% rules.each do |log_rule| -%> +Log <%= log_rule %> +<% end -%> +<% end -%> -<%- if scope.lookupvar('tor::daemon::automap_hosts_on_resolve') != '0' then -%> -AutomapHostsOnResolve <%= scope.lookupvar('tor::daemon::automap_hosts_on_resolve') %> -<%- end -%> -<%- if scope.lookupvar('tor::daemon::use_bridges') != '0' then -%> -UseBridges <%= scope.lookupvar('tor::daemon::use_bridges') %> +<% if (v=scope.lookupvar('tor::daemon::automap_hosts_on_resolve')) != '0' -%> +AutomapHostsOnResolve <%= v %> +<% end -%> +<% if (v=scope.lookupvar('tor::daemon::use_bridges')) != '0' -%> +UseBridges <%= v %> <%- end -%> diff --git a/templates/torrc.hidden_service.erb b/templates/torrc.hidden_service.erb index b9f758a..4dec0b2 100644 --- a/templates/torrc.hidden_service.erb +++ b/templates/torrc.hidden_service.erb @@ -1,6 +1,6 @@ -# hidden service <%= name %> -HiddenServiceDir <%= data_dir %>/<%= name %> -<%- for port in ports -%> +# hidden service <%= @name %> +HiddenServiceDir <%= @data_dir %>/<%= @name %> +<% @ports.each do |port| -%> HiddenServicePort <%= port %> -<%- end -%> +<% end -%> diff --git a/templates/torrc.map_address.erb b/templates/torrc.map_address.erb index 3fb0274..ef4f268 100644 --- a/templates/torrc.map_address.erb +++ b/templates/torrc.map_address.erb @@ -1,3 +1,3 @@ -# map address <%= name %> -MapAddress <%= address %> <%= newaddress %> +# map address <%= @name %> +MapAddress <%= @address %> <%= @newaddress %> diff --git a/templates/torrc.relay.erb b/templates/torrc.relay.erb index 74a7c61..511bda1 100644 --- a/templates/torrc.relay.erb +++ b/templates/torrc.relay.erb @@ -1,46 +1,46 @@ # relay -<%- if port != 0 then -%> -ORPort <%= port %> -<%- for listen_address in listen_addresses -%> +<% if @port != 0 -%> +ORPort <%= @port %> +<% listen_addresses.each do |listen_address| -%> ORListenAddress <%= listen_address %> -<%- end -%> -<%- for outbound_bindaddress in real_outbound_bindaddresses -%> +<% end -%> +<% real_outbound_bindaddresses.each do |outbound_bindaddress| -%> OutboundBindAddress <%= outbound_bindaddress %> -<%- end -%> -<%- if nickname != '' then -%> -Nickname <%= nickname %> -<%- end -%> -<%- if address != '' then -%> -Address <%= address %> -<%- end -%> -<%- if portforwarding != '0' then -%> -PortForwarding <%= portforwarding %> -<%- end -%> -<%- if bandwidth_rate != '' then -%> -BandwidthRate <%= bandwidth_rate %> KB -<%- end -%> -<%- if bandwidth_burst != '' then -%> -BandwidthBurst <%= bandwidth_burst %> KB -<%- end -%> -<%- if relay_bandwidth_rate != '0' then -%> -RelayBandwidthRate <%= relay_bandwidth_rate %> KB -<%- end -%> -<%- if relay_bandwidth_burst != '0' then -%> -RelayBandwidthBurst <%= relay_bandwidth_burst %> KB -<%- end -%> -<%- if accounting_max != '0' then -%> -AccountingMax <%= accounting_max %> GB -<%- if accounting_start then -%> -AccountingStart <%= accounting_start %> -<%- end -%> -<%- end -%> -<%- if contact_info != '' then -%> -ContactInfo <%= contact_info %> -<%- end -%> -<%- end -%> -<%- if my_family != '' then -%> -MyFamily <%= my_family %> -<%- end -%> -<%- if bridge_relay != '0' then -%> -BridgeRelay <%= bridge_relay %> -<%- end -%> +<% end -%> +<% if @nickname != '' -%> +Nickname <%= @nickname %> +<% end -%> +<% if @address != '' -%> +Address <%= @address %> +<% end -%> +<% if @portforwarding != '0' -%> +PortForwarding <%= @portforwarding %> +<% end -%> +<% if @bandwidth_rate != '' -%> +BandwidthRate <%= @bandwidth_rate %> KB +<% end -%> +<% if @bandwidth_burst != '' -%> +BandwidthBurst <%= @bandwidth_burst %> KB +<% end -%> +<% if @relay_bandwidth_rate != '0' -%> +RelayBandwidthRate <%= @relay_bandwidth_rate %> KB +<% end -%> +<% if @relay_bandwidth_burst != '0' -%> +RelayBandwidthBurst <%= @relay_bandwidth_burst %> KB +<% end -%> +<% if @accounting_max != '0' -%> +AccountingMax <%= @accounting_max %> GB +<% if @accounting_start -%> +AccountingStart <%= @accounting_start %> +<% end -%> +<% end -%> +<% if @contact_info != '' -%> +ContactInfo <%= @contact_info %> +<% end -%> +<% end -%> +<% if @my_family != '' -%> +MyFamily <%= @my_family %> +<% end -%> +<% if @bridge_relay != '0' -%> +BridgeRelay <%= @bridge_relay %> +<% end -%> diff --git a/templates/torrc.socks.erb b/templates/torrc.socks.erb index caf750d..4bc3ddc 100644 --- a/templates/torrc.socks.erb +++ b/templates/torrc.socks.erb @@ -1,9 +1,9 @@ # socks -SocksPort <%= port %> -<%- for listen_address in listen_addresses -%> +SocksPort <%= @port %> +<% @listen_addresses.each do |listen_address| -%> SocksListenAddress <%= listen_address %> -<%- end -%> -<%- for policy in policies -%> +<% end -%> +<% @policies.each do |policy| -%> SocksPolicy <%= policy %> -<%- end -%> +<% end -%> diff --git a/templates/torrc.transparent.erb b/templates/torrc.transparent.erb index dae97dc..c683150 100644 --- a/templates/torrc.transparent.erb +++ b/templates/torrc.transparent.erb @@ -1,5 +1,5 @@ # Transparent proxy -TransPort <%= port %> -<%- for listen_address in listen_addresses -%> +TransPort <%= @port %> +<% @listen_addresses.each do |listen_address| -%> TransListenAddress <%= listen_address %> -<%- end -%> +<% end -%> |