更新设备管理一键部署安装包
This commit is contained in:
Binary file not shown.
@@ -15,24 +15,18 @@
|
||||
dest: /opt/tsg/snmp/application.properties
|
||||
tags: template
|
||||
|
||||
- name: "Start oam_snmp"
|
||||
systemd:
|
||||
name: oam_snmp
|
||||
state: restarted
|
||||
enabled: yes
|
||||
- name: "Templates oam_snmp.service"
|
||||
template:
|
||||
src: "{{ role_path }}/templates/oam_snmp.service.j2"
|
||||
dest: /usr/lib/systemd/system/oam_snmp.service
|
||||
|
||||
- name: "bak snmpd.conf"
|
||||
shell: cp -rf /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf_origin
|
||||
- name: "mkdir /etc/snmp"
|
||||
file:
|
||||
path: /etc/snmp
|
||||
state: directory
|
||||
|
||||
- name: "Templates snmpd.conf"
|
||||
template:
|
||||
src: "{{role_path}}/templates/snmpd.conf"
|
||||
dest: /etc/snmp/snmpd.conf
|
||||
tags: template
|
||||
|
||||
#- name: "Start snmpd"
|
||||
# systemd:
|
||||
# name: snmpd
|
||||
# state: restarted
|
||||
# enabled: yes
|
||||
# ignore_errors: yes
|
||||
@@ -1,6 +1,5 @@
|
||||
oam.influx.url=http://{{ mcn0_ip }}:58086
|
||||
# oam.influx.url=http://192.168.161.134:8086
|
||||
oam.influx.db=tsg_stat
|
||||
oam.influx.user=admin
|
||||
oam.influx.password=tsg2019
|
||||
oam.influx.db={{ influxdb.dbname }}
|
||||
oam.influx.user={{ influxdb.userbname }}
|
||||
oam.influx.password={{ influxdb.passwd }}
|
||||
oam.influx.recentminutes=5
|
||||
|
||||
14
roles/oam_snmp/templates/oam_snmp.service.j2
Normal file
14
roles/oam_snmp/templates/oam_snmp.service.j2
Normal file
@@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=oam_snmp daemon
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment=OAM_DIR=/opt/tsg/snmp/
|
||||
ExecStart=/usr/lib/jvm/{{ java_version }}/bin/java -jar -Doam.snmp.config=${OAM_DIR}application.properties ${OAM_DIR}oam_snmp.jar udp:0.0.0.0/50161
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
RestartSec=5s
|
||||
Reference in New Issue
Block a user