Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8391865
geo.erb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
841 B
Subscribers
None
geo.erb
View Options
# MANAGED BY PUPPET
<%
# sorting ip addresses in ascending order is more efficient for nginx - so we need
# to convert them to numbers first via IPAddr
require
'ipaddr'
-%>
geo
<%=
@address
?
"
#{
@address
}
"
:
''
%>
$
<%=
@name
%>
{
<%
if
@ranges
-%>
ranges;
<%
end
-%>
<%
if
@default
-%>
default
<%=
@default
%>
;
<%
end
-%>
<%
if
@delete
-%>
delete
<%=
@delete
%>
;
<%
end
-%>
<%
if
@proxies
-%>
<%-
if
@proxy_recursive
-%>
proxy_recursive;
<%-
end
-%>
<%-
[
@proxies
].
flatten
.
each
do
|
proxy
|
-%>
proxy
<%=
proxy
%>
;
<%-
end
-%>
<%
end
-%>
<%
if
@networks
-%>
<%-
field_width
=
@networks
.
inject
(
0
)
{
|
l
,(
k
,
v
)
|
k
.
size
>
l
?
k
.
size
:
l
}
-%>
<%-
@networks
.
sort_by
{
|
k
,
v
|
IPAddr
.
new
(
k
.
split
(
'-'
)
.
first
)
.
to_i
}
.
each
do
|
key
,
value
|
-%>
<%=
sprintf
(
"%-*s"
,
field_width
,
key
)
%>
<%=
value
%>
;
<%-
end
-%>
<%
end
-%>
}
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Jun 4 2025, 6:51 PM (11 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3398827
Attached To
rSPNGX Puppet NGINX management module
Event Timeline
Log In to Comment