1.add role tsg_env_patch
2.delete role which is unuseful
This commit is contained in:
@@ -30,6 +30,10 @@
|
||||
#[adc_mcn3]
|
||||
#10.3.76.1 device_id=device_1
|
||||
#10.3.76.2 device_id=device_2
|
||||
#info warning
|
||||
#broken blade list
|
||||
#10.14.53.20
|
||||
#10.14.54.2
|
||||
|
||||
[adc_mxn]
|
||||
10.14.55.[1:20]
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
- hosts: adc_mcn0
|
||||
remote_user: root
|
||||
roles:
|
||||
- docker-env
|
||||
- tsg-diagnose
|
||||
@@ -1,4 +0,0 @@
|
||||
- hosts: adc_mxn
|
||||
remote_user: root
|
||||
roles:
|
||||
- reboot-all-adc
|
||||
@@ -1,4 +0,0 @@
|
||||
- hosts: adc_mxn
|
||||
remote_user: root
|
||||
roles:
|
||||
- reboot-adc-mcn-by-ipmitool
|
||||
@@ -1,13 +0,0 @@
|
||||
- hosts: adc_mcn0
|
||||
remote_user: root
|
||||
roles:
|
||||
- sapp_restart
|
||||
- certstore_restart
|
||||
|
||||
- hosts:
|
||||
- adc_mcn1
|
||||
- adc_mcn2
|
||||
- adc_mcn3
|
||||
remote_user: root
|
||||
roles:
|
||||
- tfe_restart
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -1,7 +0,0 @@
|
||||
- name: 'sapp service start'
|
||||
systemd:
|
||||
name: sapp
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
||||
state: restarted
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
- name: 'tfe service start'
|
||||
systemd:
|
||||
name: tfe
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
||||
state: restarted
|
||||
|
||||
@@ -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)
|
||||
@@ -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
|
||||
|
||||
@@ -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})
|
||||
5
roles/tsg-env-patch/tasks/main.yml
Normal file
5
roles/tsg-env-patch/tasks/main.yml
Normal 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
|
||||
11
tasks/reboot_adc_mcn_by_ipmitool.yml
Normal file
11
tasks/reboot_adc_mcn_by_ipmitool.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
- hosts: adc_mxn
|
||||
remote_user: root
|
||||
tasks:
|
||||
- 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 0x98 chassis power reset
|
||||
- ipmitool -t 0x88 chassis power reset
|
||||
12
tasks/reboot_adc_mcn_by_ssh.yml
Normal file
12
tasks/reboot_adc_mcn_by_ssh.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
- hosts: adc_mxn
|
||||
remote_user: root
|
||||
tasks:
|
||||
- name: "reboot adc mcn*"
|
||||
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
|
||||
|
||||
24
tasks/uninstall_maat_redis.yml
Normal file
24
tasks/uninstall_maat_redis.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
- hosts: host_uninstall_redis
|
||||
remote_user: root
|
||||
tasks:
|
||||
- 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
|
||||
|
||||
8
tsg_env_patch.yml
Normal file
8
tsg_env_patch.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
- hosts:
|
||||
- adc_mcn0
|
||||
- adc_mcn1
|
||||
- adc_mcn2
|
||||
- adc_mcn3
|
||||
remote_user: root
|
||||
roles:
|
||||
- tsg-env-patch
|
||||
@@ -1,3 +0,0 @@
|
||||
- hosts: host_uninstall_redis
|
||||
roles:
|
||||
- maat-redis-uninstall
|
||||
@@ -1,4 +0,0 @@
|
||||
- hosts: adc_mcn0
|
||||
remote_user: root
|
||||
roles:
|
||||
- tsg-diagnose-uninstall
|
||||
Reference in New Issue
Block a user