1.add role tsg_env_patch

2.delete role which is unuseful
This commit is contained in:
fumingwei
2020-11-17 17:45:40 +06:00
parent cc7155ec1a
commit 3b125413ce
21 changed files with 72 additions and 113 deletions

View File

@@ -1,20 +0,0 @@
- name: "maat-redis-uninstall: stop maat-redis service"
systemd:
name: "{{ item }}"
state: stopped
with_items:
- maat-redis.service
- redis.service
- name: "maat-redis-uninstall: rm maat-redis.conf and maat-redis.service"
file:
path: "{{ item }}"
state: absent
with_items:
- /etc/maat-redis.conf
- /usr/lib/systemd/system/maat-redis.service
- name: remove redis
yum:
name: redis
state: absent

View File

@@ -1,8 +0,0 @@
- name: "reboot adc in mxn by ipmitool"
shell: "{{ item }}"
ignore_errors: true
with_items:
- ipmitool -t 0x90 chassis power reset
- ipmitool -t 0x80 chassis power reset
- ipmitool -t 0x88 chassis power reset
- ipmitool -t 0x98 chassis power reset

View File

@@ -1,9 +0,0 @@
- name: "reboot adc"
shell: "{{ item }}"
ignore_errors: true
with_items:
- ssh 192.168.100.1 reboot
- ssh 192.168.100.2 reboot
- ssh 192.168.100.3 reboot
- ssh 192.168.100.4 reboot
- reboot

View File

@@ -1,7 +0,0 @@
- name: 'sapp service start'
systemd:
name: sapp
enabled: yes
daemon_reload: yes
state: restarted

View File

@@ -1,7 +0,0 @@
- name: 'tfe service start'
systemd:
name: tfe
enabled: yes
daemon_reload: yes
state: restarted

View File

@@ -1,7 +0,0 @@
#!/bin/bash
systemctl stop docker &&
systemctl disable docker &&
#执行不成功就把下面的注释
#yum remove docker-ce &&
rm -rf /var/lib/docker &&
rm -rf $(whereis docker)

View File

@@ -1,22 +0,0 @@
- name: stop tsg-diagnose
systemd:
name: tsg-diagnose
state: stopped
- name: docker-compose down
shell: cd /opt/tsg/tsg-diagnose/compose; docker-compose down; docker-compose down
- name: remove the tsg-diagnose
yum:
name: tsg-diagnose
state: absent
- name: copy origin uninstall docker shell file
copy:
src: "{{ role_path }}/files/"
dest: /tmp/ansible_deploy/
mode: 0755
- name: rm docker-compose
shell: cd /tmp/ansible_deploy/; sh xz_docker.sh;rm /usr/local/bin/docker-compose

View File

@@ -0,0 +1,8 @@
99c99
< ${CURRENT_PATH}/${REMOTE_CONTROL_BIN} -s ${TP_SVR} -n ${TP_PORT} -c "show version"
---
> echo "show version" | nc ${TP_SVR} ${TP_PORT}
136c136
< MAC_TABLE=`${CURRENT_PATH}/${REMOTE_CONTROL_BIN} -s ${TP_SVR} -n ${TP_PORT} -c "show mac table all"`
---
> MAC_TABLE=$(echo "show mac table all" | nc ${TP_SVR} ${TP_PORT})

View File

@@ -0,0 +1,5 @@
- name: "patch setup scripts in tsg-env"
patch:
src: "{{ role_path }}/files/replace_switch_non_block_with_nc_v2.patch"
dest: /opt/tsg/env/setup
backup: true