更新设备管理一键部署安装包

This commit is contained in:
zhangzhihan
2020-04-13 17:49:10 +08:00
parent b76d267504
commit 39a13763eb
48 changed files with 323 additions and 630 deletions

View File

@@ -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

View File

@@ -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

View 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