adding localnet.json.erb and in init.pp
This commit is contained in:
parent
165047922a
commit
cab4fc9f8b
2 changed files with 115 additions and 0 deletions
|
@ -181,6 +181,11 @@ class rhizo_base {
|
||||||
require => Vcsrepo['/var/rhizomatica'],
|
require => Vcsrepo['/var/rhizomatica'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file { '/var/www/html/rai/js/localnet.json':
|
||||||
|
ensure => present,
|
||||||
|
content => template('rhizo_base/localnet.json.erb'),
|
||||||
|
}
|
||||||
|
|
||||||
exec { 'install_rccn':
|
exec { 'install_rccn':
|
||||||
command => '/usr/bin/python /var/rhizomatica/rccn/install.py',
|
command => '/usr/bin/python /var/rhizomatica/rccn/install.py',
|
||||||
require => [ File['/var/rhizomatica/rccn/config_values.py'],
|
require => [ File['/var/rhizomatica/rccn/config_values.py'],
|
||||||
|
|
110
modules/rhizo_base/templates/localnet.json.erb
Normal file
110
modules/rhizo_base/templates/localnet.json.erb
Normal file
|
@ -0,0 +1,110 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"type": "bsc",
|
||||||
|
"ip": "<%= @vpn_ip_address %>",
|
||||||
|
"geo": [
|
||||||
|
17.145365,
|
||||||
|
-96.229289
|
||||||
|
]
|
||||||
|
},
|
||||||
|
<% if @bts1_ip_address -%>
|
||||||
|
{
|
||||||
|
"type": "bts",
|
||||||
|
"ip": "<%= @bts1_ip_address %>",
|
||||||
|
"geo": [
|
||||||
|
"17.168711",
|
||||||
|
"-96.260853"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
<% end -%>
|
||||||
|
<% if @bts2_ip_address -%>
|
||||||
|
{
|
||||||
|
"type": "bts",
|
||||||
|
"ip": "<%= @bts2_ip_address %>",
|
||||||
|
"geo": [
|
||||||
|
17.16915284960935,
|
||||||
|
-96.26445739621659
|
||||||
|
]
|
||||||
|
},
|
||||||
|
<% end -%>
|
||||||
|
<% if @bts3_ip_address -%>
|
||||||
|
{
|
||||||
|
"type": "bts",
|
||||||
|
"ip": "<%= @bts3_ip_address %>",
|
||||||
|
"geo": [
|
||||||
|
17.161211,
|
||||||
|
-96.209068
|
||||||
|
]
|
||||||
|
},
|
||||||
|
<% end -%>
|
||||||
|
<% if @link2_ip_address -%>
|
||||||
|
{
|
||||||
|
"type": "link",
|
||||||
|
"ip": "<%= @link2_ip_address %>",
|
||||||
|
"geo": [
|
||||||
|
17.161211,
|
||||||
|
-96.209068
|
||||||
|
]
|
||||||
|
},
|
||||||
|
<% end -%>
|
||||||
|
<% if @link3_ip_address -%>
|
||||||
|
{
|
||||||
|
"type": "link",
|
||||||
|
"ip": "<%= @link3_ip_address %>",
|
||||||
|
"geo": [
|
||||||
|
17.161211,
|
||||||
|
-96.209068
|
||||||
|
]
|
||||||
|
},
|
||||||
|
<% end -%>
|
||||||
|
<% if @link4_ip_address -%>
|
||||||
|
{
|
||||||
|
"type": "link",
|
||||||
|
"ip": "<%= @link4_ip_address %>",
|
||||||
|
"geo": [
|
||||||
|
17.161211,
|
||||||
|
-96.209068
|
||||||
|
]
|
||||||
|
},
|
||||||
|
<% end -%>
|
||||||
|
<% if @link5_ip_address -%>
|
||||||
|
{
|
||||||
|
"type": "link",
|
||||||
|
"ip": "<%= @link5_ip_address %>",
|
||||||
|
"geo": [
|
||||||
|
17.161211,
|
||||||
|
-96.209068
|
||||||
|
]
|
||||||
|
},
|
||||||
|
<% end -%>
|
||||||
|
<% if @link6_ip_address -%>
|
||||||
|
{
|
||||||
|
"type": "link",
|
||||||
|
"ip": "<%= @link6_ip_address %>",
|
||||||
|
"geo": [
|
||||||
|
17.161211,
|
||||||
|
-96.209068
|
||||||
|
]
|
||||||
|
},
|
||||||
|
<% end -%>
|
||||||
|
<% if @link7_ip_address -%>
|
||||||
|
{
|
||||||
|
"type": "link",
|
||||||
|
"ip": "<%= @link7_ip_address %>",
|
||||||
|
"geo": [
|
||||||
|
17.161211,
|
||||||
|
-96.209068
|
||||||
|
]
|
||||||
|
},
|
||||||
|
<% end -%>
|
||||||
|
<% if @link1_ip_address -%>
|
||||||
|
{
|
||||||
|
"type": "link",
|
||||||
|
"ip": "<%= @link1_ip_address %>",
|
||||||
|
"geo": [
|
||||||
|
17.161211,
|
||||||
|
-96.209068
|
||||||
|
]
|
||||||
|
}
|
||||||
|
<% end -%>
|
||||||
|
]
|
Loading…
Add table
Add a link
Reference in a new issue