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

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

@@ -94,7 +94,7 @@
- name: "start and enable mariadb"
systemd:
name: mariadb
state: restarted
state: started
enabled: yes
daemon_reload: yes
@@ -104,4 +104,21 @@
- name: "set mariadb privileges"
shell: mysql -uroot -p{{ mariadb.password }} -e "grant all privileges on *.* to root@'%' identified by 'tsg2019' with grant option;"
shell: mysql -uroot -p{{ mariadb.password }} -e "flush privileges;"
shell: mysql -uroot -p{{ mariadb.password }} -e "create database tsg_oam"
- name: "get remote tsg sn"
shell: cat /opt/tsg/etc/tsg_sn.json | grep sn | awk -F "\"" {'print $4'}
register: adc_tsg_sn
- name: "Templates tsg_threshold.sql"
template:
src: "{{role_path}}/templates/tsg_threshold.sql.j2"
dest: /tmp/tsg-cli-deploy/tsg_threshold.sql
tags: template
- name: "debug show tsg_sn"
debug: var=adc_tsg_sn.stdout
- name: "import the sql after template"
shell: mysql -s -h 127.0.0.1 -u {{ mariadb.username }} -p{{ mariadb.password }} < /tmp/tsg-cli-deploy/tsg_threshold.sql