You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
192 lines
3.6 KiB
192 lines
3.6 KiB
[% PROCESS '/usr/lib/ngcp-ngcpcfg/get_hostname'; hostname = out -%]
|
|
[% argv.host=hostname; argv.role='proxy';
|
|
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
|
is_proxy = out
|
|
-%]
|
|
[% argv.host=hostname; argv.role='lb';
|
|
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
|
is_lb = out
|
|
-%]
|
|
[% argv.host=hostname; argv.role='mgmt';
|
|
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
|
is_mgmt = out
|
|
-%]
|
|
[% argv.host=hostname; argv.role='db';
|
|
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
|
is_db = out
|
|
-%]
|
|
[% argv.host=hostname; argv.role='rtp';
|
|
PROCESS '/usr/lib/ngcp-ngcpcfg/has_role';
|
|
is_rtp = out
|
|
-%]
|
|
[% argv.host=hostname; argv.type='ha_int';
|
|
PROCESS '/usr/lib/ngcp-ngcpcfg/get_iface';
|
|
host_ha_iface = out
|
|
-%]
|
|
[% argv.host=hostname; argv.type='sip_ext';
|
|
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_shared_ips_for_host';
|
|
sip_ext_ips = out
|
|
-%]
|
|
[% IF !sip_ext_ips.size -%]
|
|
[% argv.host=hostname; argv.type='sip_ext';
|
|
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_ips_for_host';
|
|
sip_ext_ips = out;
|
|
-%]
|
|
[% END -%]
|
|
[% argv.host=hostname; argv.type='web_ext';
|
|
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_shared_ips_for_host';
|
|
web_ext_ips = out
|
|
-%]
|
|
[% IF !web_ext_ips.size -%]
|
|
[% argv.host=hostname; argv.type='web_ext';
|
|
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_ips_for_host';
|
|
web_ext_ips = out;
|
|
-%]
|
|
[% END -%]
|
|
[% argv.host=hostname; argv.type='web_int';
|
|
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_shared_ips_for_host';
|
|
web_int_ips = out
|
|
-%]
|
|
[% IF !web_int_ips.size -%]
|
|
[% argv.host=hostname; argv.type='web_int';
|
|
PROCESS '/usr/lib/ngcp-ngcpcfg/get_all_ips_for_host';
|
|
web_int_ips = out;
|
|
-%]
|
|
[% END -%]
|
|
|
|
port:
|
|
|
|
[% IF is_mgmt -%]
|
|
tcp:443:
|
|
listening: true
|
|
ip: ["127.0.0.1"]
|
|
|
|
tcp:1443:
|
|
listening: true
|
|
ip: ["127.0.0.1"]
|
|
|
|
[% END -%]
|
|
[% IF is_mgmt && pbx.enable == 'yes' -%]
|
|
tcp:1444:
|
|
listening: true
|
|
ip: ["[% web_ext_ips.0 -%]"]
|
|
|
|
tcp:1445:
|
|
listening: true
|
|
ip: ["[% web_ext_ips.0 -%]"]
|
|
|
|
[% END -%]
|
|
tcp:22:
|
|
listening: true
|
|
ip: ["0.0.0.0"]
|
|
|
|
tcp:22:
|
|
listening: true
|
|
ip: ["[% hosts.$hostname.$host_ha_iface.ip %]"]
|
|
|
|
tcp:24009:
|
|
listening: true
|
|
ip: ["0.0.0.0"]
|
|
|
|
tcp:25:
|
|
listening: true
|
|
ip: ["127.0.0.1"]
|
|
|
|
tcp:2812:
|
|
listening: true
|
|
ip: ["127.0.0.1"]
|
|
|
|
tcp:3306:
|
|
listening: true
|
|
ip: ["0.0.0.0"]
|
|
|
|
[% IF is_lb -%]
|
|
tcp:5060:
|
|
listening: true
|
|
ip: ["[% sip_ext_ips.0 -%]"]
|
|
|
|
[% END -%]
|
|
[% IF is_proxy -%]
|
|
tcp:5062:
|
|
listening: true
|
|
ip: ["127.0.0.1"]
|
|
|
|
tcp:5222:
|
|
listening: true
|
|
ip: ["[% sip_ext_ips.0 -%]"]
|
|
|
|
tcp:5269:
|
|
listening: true
|
|
ip: ["[% sip_ext_ips.0 -%]"]
|
|
|
|
tcp:5280:
|
|
listening: true
|
|
ip: ["127.0.0.1"]
|
|
|
|
tcp:5281:
|
|
listening: true
|
|
ip: ["127.0.0.1"]
|
|
|
|
tcp:5582:
|
|
listening: true
|
|
ip: ["127.0.0.1"]
|
|
|
|
tcp:8090:
|
|
listening: true
|
|
ip: ["127.0.0.1"]
|
|
|
|
tcp:5038:
|
|
listening: true
|
|
ip: ["127.0.0.1"]
|
|
|
|
udp:5040:
|
|
listening: true
|
|
ip: ["127.0.0.1"]
|
|
|
|
udp:5070:
|
|
listening: true
|
|
ip: ["127.0.0.1"]
|
|
|
|
udp:5080:
|
|
listening: true
|
|
ip: ["127.0.0.1"]
|
|
|
|
[% END -%]
|
|
[% IF is_rtp || is_proxy || is_db -%]
|
|
tcp:6379:
|
|
listening: true
|
|
ip: ["[% hosts.$hostname.$host_ha_iface.ip %]"]
|
|
|
|
[% END -%]
|
|
tcp:7777:
|
|
listening: false
|
|
|
|
udp:7777:
|
|
listening: false
|
|
|
|
udp:123:
|
|
listening: true
|
|
ip: ["0.0.0.0"]
|
|
|
|
udp:161:
|
|
listening: true
|
|
ip: ["127.0.0.1"]
|
|
|
|
[% IF is_rtp -%]
|
|
udp:2223:
|
|
listening: true
|
|
ip: ["127.0.0.1"]
|
|
|
|
[% END -%]
|
|
udp:25826:
|
|
listening: true
|
|
ip: ["[% hosts.$hostname.$host_ha_iface.ip %]"]
|
|
|
|
udp:[% heartbeat.port ? heartbeat.port : '694' %]:
|
|
listening: true
|
|
ip: ["0.0.0.0"]
|
|
|
|
tcp:22:
|
|
# last record to keep JSON valid
|
|
listening: true
|