Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8391011
ssh_config.erb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
ssh_config.erb
View Options
# 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
Details
Attached
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
Attached To
rSPSSH puppet-saz-ssh
Event Timeline
Log In to Comment