]> gitweb.fluxo.info Git - puppet-tor.git/commitdiff
address puppet 3.x deprecation warnings
authormh <mh@immerda.ch>
Fri, 18 Apr 2014 09:10:16 +0000 (11:10 +0200)
committermh <mh@immerda.ch>
Fri, 18 Apr 2014 09:10:16 +0000 (11:10 +0200)
templates/torrc.bridge.erb
templates/torrc.control.erb
templates/torrc.directory.erb
templates/torrc.dns.erb
templates/torrc.exit_policy.erb
templates/torrc.global.erb
templates/torrc.hidden_service.erb
templates/torrc.map_address.erb
templates/torrc.relay.erb
templates/torrc.socks.erb
templates/torrc.transparent.erb

index 58ef70daf1303a27db7d5bf2e761651af1d19dc9..559ce5dfb24d3009b0191b42ce843991f165cb4a 100644 (file)
@@ -1,3 +1,3 @@
-# Bridge <%= name%>
-Bridge <%= ip%>:<%= port%><%- if fingerprint -%> <%= fingerprint%><%- end -%>
+# Bridge <%= @name %>
+Bridge <%= @ip %>:<%= @port %><% if @fingerprint -%> <%= @fingerprint%><% end -%>
 
index 336c72d5844d2eac5cc6e367298854d3bf9af300..0b68faff519390976789359500c0b2a58b06f32e 100644 (file)
@@ -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 -%>
 
index c6b35b5e7fd81e99df2a4db44b14fc2e281cc717..1af9f40f8990a865c9d3c25f1d7db2238bab1694 100644 (file)
@@ -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 -%>
 
index bd1e719392393ee12f5dda6956224680d5a22658..57cf46d99fa45e2be7e721ac5a5886d88385ef53 100644 (file)
@@ -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 -%>
index 65f9d098ba0b372e15c146bcfe4603efb48407cf..a30d43b80d95dd724df1a50162065a97f5403acf 100644 (file)
@@ -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 -%>
 
index e0f6f7e3bdeaafbd8e0d87f0331dd38b79385150..c320bfae300b26413907961e0936c4001b144a04 100644 (file)
@@ -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 -%>
index b9f758ab74fee6f19eee9b21abc077583e45f3e5..4dec0b25078fcaa6245e13011b83f5de704f661f 100644 (file)
@@ -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 -%>
 
index 3fb0274cdca96d46db134416258b7ede316ffd0e..ef4f26830fa9d31e52a0be8ad935c16df679bbe4 100644 (file)
@@ -1,3 +1,3 @@
-# map address <%= name %>
-MapAddress <%= address %> <%= newaddress %>
+# map address <%= @name %>
+MapAddress <%= @address %> <%= @newaddress %>
 
index 74a7c61cd9d05d4a5e2bcfea2782ea1d050a2a33..511bda11d5bdce1e4096a5192dcd5d00a53ccf5c 100644 (file)
@@ -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 -%>
index caf750d52f3cb00659b3d379a8597feb692bfba3..4bc3ddc1e8787db249c469889f5805ac61295aa2 100644 (file)
@@ -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 -%>
 
index dae97dcbf67cd956d39076e507856164ec8f7152..c683150fd14a0e9d9068528fb9051bcc66c94be6 100644 (file)
@@ -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 -%>