Page MenuHomeSoftware Heritage

ssh_config.erb
No OneTemporary

ssh_config.erb

# File managed by Puppet
<%-
def bool2str(v)
case v
when true
'yes'
when false
'no'
else
v
end
end
-%>
<%- @options.each do |k, v| -%>
<%- if v.is_a?(Hash) -%>
<%- if k.length > 1024 -%>
<%- fail("Line exceeds 1024 characters: #{k}") -%>
<%- end -%>
<%= k %>
<%- v.sort.each do |key, value| -%>
<%- if value.is_a?(Array) -%>
<%- value.each do |a| -%>
<%- if a != '' -%>
<%- line_content = "#{key} #{bool2str(a)}" -%>
<%- if line_content.length > 1020 -%>
<%- fail("Line exceeds 1024 characters: #{line_content}") -%>
<%- else -%>
<%= line_content %>
<%- end -%>
<%- end -%>
<%- end -%>
<%- elsif value != '' -%>
<%- line_content = "#{key} #{bool2str(value)}" -%>
<%- if line_content.length > 1020 -%>
<%- fail("Line exceeds 1024 characters: #{line_content}") -%>
<%- end -%>
<%= line_content %>
<%- end -%>
<%- end -%>
<%- else -%>
<%- if v.is_a?(Array) -%>
<%- v.each do |a| -%>
<%- if a != '' -%>
<%- line_content = "#{k} #{bool2str(a)}" -%>
<%- if line_content.length > 1024 -%>
<%- fail("Line exceeds 1024 characters: #{line_content}") -%>
<%- end -%>
<%= k %> <%= bool2str(a) %>
<%- end -%>
<%- end -%>
<%- elsif v != :undef and v != '' -%>
<%- line_content = "#{k} #{bool2str(v)}" -%>
<%- if line_content.length > 1024 -%>
<%- fail("Line exceeds 1024 characters: #{line_content}") -%>
<%- end -%>
<%= k %> <%= bool2str(v) %>
<%- end -%>
<%- end -%>
<%- end -%>

File Metadata

Mime Type
text/x-ruby
Expires
Jun 4 2025, 6:37 PM (14 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3307438

Event Timeline