]> gitweb.fluxo.info Git - puppet-sshd.git/commitdiff
Template out the possibility of specifying the key word 'off' to the
authorMicah Anderson <micah@riseup.net>
Wed, 8 Jul 2009 00:55:13 +0000 (20:55 -0400)
committerMicah Anderson <micah@riseup.net>
Wed, 8 Jul 2009 00:55:13 +0000 (20:55 -0400)
$sshd_port parameter, which simply puts a comment in front of that
option, rather than specifying it.

templates/sshd_config/CentOS.erb
templates/sshd_config/Debian_etch.erb
templates/sshd_config/Debian_lenny.erb
templates/sshd_config/Gentoo.erb
templates/sshd_config/OpenBSD.erb

index a3a9a5290eed582b56ebbd0ac3dc662c2011a4c9..bc5256ae5e7fd31f37ddfdf4ced810e95cf40894 100644 (file)
 <%= sshd_head_additional_options %>
 <%- end %>
 
+<%- unless sshd_port.to_s.empty? then -%>
+<%- if sshd_port.to_s == 'off' then -%>
+#Port -- disabled by puppet
+<% else -%>
+Port <%= sshd_port -%>
+<% end -%>
+<%- else -%>
+Port 22
+<%- end -%>
+
 # Use these options to restrict which interfaces/protocols sshd will bind to
 <% for address in sshd_listen_address -%>
 ListenAddress <%= address %>
index 25241725ed1da7969c8788a5f8cb4aed0e09b0ce..746a447ef2b6db67145cff24459bacebf592b844 100644 (file)
@@ -7,7 +7,11 @@
 
 # What ports, IPs and protocols we listen for
 <%- unless sshd_port.to_s.empty? then -%>
+<%- if sshd_port.to_s == 'off' then -%>
+#Port -- disabled by puppet
+<% else -%>
 Port <%= sshd_port -%>
+<% end -%>
 <%- else -%>
 Port 22
 <%- end -%>
index c7f4ab4e9612e1fe21bee381f564f9e835c16b18..18f3e4d5cdf9e2ea5ba9ae46e12778ba12ad46e6 100644 (file)
@@ -7,7 +7,11 @@
 
 # What ports, IPs and protocols we listen for
 <%- unless sshd_port.to_s.empty? then -%>
+<%- if sshd_port.to_s == 'off' then -%>
+#Port -- disabled by puppet
+<% else -%>
 Port <%= sshd_port -%>
+<% end -%>
 <%- else -%>
 Port 22
 <%- end -%>
index ad1503123d52532e072e0ce5d39e8122e7733e10..2112f0defb67dd7a053832855821ae8a500fd627 100644 (file)
 <%= sshd_head_additional_options %>
 <%- end %>
 
+<%- unless sshd_port.to_s.empty? then -%>
+<%- if sshd_port.to_s == 'off' then -%>
+#Port -- disabled by puppet
+<% else -%>
+Port <%= sshd_port -%>
+<% end -%>
+<%- else -%>
+Port 22
+<%- end -%>
+
 # Use these options to restrict which interfaces/protocols sshd will bind to
 <% for address in sshd_listen_address -%>
 ListenAddress <%= address %>
index 045d9ba59e01ff0fc2e98df0f07d2831e191760a..69e8afab131c548d6079d850c37d732ede699544 100644 (file)
 <%= sshd_head_additional_options %>
 <%- end %>
 
+<%- unless sshd_port.to_s.empty? then -%>
+<%- if sshd_port.to_s == 'off' then -%>
+#Port -- disabled by puppet
+<% else -%>
+Port <%= sshd_port -%>
+<% end -%>
+<%- else -%>
+Port 22
+<%- end -%>
+
 # Use these options to restrict which interfaces/protocols sshd will bind to
 <% for address in sshd_listen_address -%>
 ListenAddress <%= address %>