20.11.rc3 rebase version 20.11

This commit is contained in:
fumingwei
2021-01-31 22:43:40 +08:00
parent bcf5049ecb
commit 6dfaf41870
195 changed files with 2931 additions and 2149 deletions

View File

@@ -0,0 +1,13 @@
- hosts:
- adc_mcn0
- adc_mcn1
- adc_mcn2
- adc_mcn3
remote_user: root
tasks:
- name: 'Tsg-monitor service start'
systemd:
name: tsg-monitor
enabled: no
state: stopped
daemon_reload: yes

View File

@@ -0,0 +1,8 @@
- hosts: adc_mcn0
remote_user: root
tasks:
- name: 'mcn0 start tsg-diagnose service'
systemd:
name: tsg-diagnose
state: started
enabled: yes

View File

@@ -0,0 +1,8 @@
- hosts: adc_mcn0
remote_user: root
tasks:
- name: 'mcn0 stop tsg-diagnose service'
systemd:
name: tsg-diagnose
state: stopped
enabled: no

View File

@@ -0,0 +1,9 @@
- hosts:
- adc_mcn0
- adc_mcn1
- adc_mcn2
- adc_mcn3
remote_user: root
tasks:
- name: "reboot"
reboot:

View 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

View File

@@ -0,0 +1,13 @@
- 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
- reboot

View File

@@ -0,0 +1,9 @@
- hosts:
- adc_mcn0
- adc_mcn1
- adc_mcn2
- adc_mcn3
remote_user: root
tasks:
- name: 'remove mrzcpd system edit memory config'
shell: rm /etc/systemd/system/mrzcpd.service.d/memory.conf

View File

@@ -0,0 +1,5 @@
- hosts: adc_mcn3
remote_user: root
tasks:
- name: 'reset maat-redis'
shell: systemctl daemon-reload; systemctl reset-failed maat-redis

View File

@@ -0,0 +1,15 @@
- hosts:
- adc_mxn
- adc_mcn0
- adc_mcn1
- adc_mcn2
- adc_mcn3
remote_user: root
tasks:
- name: 'adc-exporter-systemd service start'
systemd:
name: adc-exporter-systemd
enabled: yes
daemon_reload: yes
state: restarted

View File

@@ -0,0 +1,11 @@
- hosts:
- adc_mcn0
remote_user: root
tasks:
- name: 'certstore service start'
systemd:
name: certstore
enabled: yes
daemon_reload: yes
state: restarted

View File

@@ -0,0 +1,14 @@
- hosts:
- adc_mcn0
- adc_mcn1
- adc_mcn2
- adc_mcn3
remote_user: root
tasks:
- name: 'mrzcpd service start'
systemd:
name: mrzcpd
enabled: yes
daemon_reload: yes
state: restarted

View File

@@ -0,0 +1,7 @@
---
- include: restart_telegraf_statistic.yml
- include: restart_mrzcpd.yml
- include: restart_sapp.yml
- include: restart_certstore.yml
- include: restart_tfe.yml
- include: restart_adc-exporter-systemd.yml

View File

@@ -0,0 +1,11 @@
- hosts:
- adc_mcn0
remote_user: root
tasks:
- name: 'sapp service start'
systemd:
name: sapp
enabled: yes
daemon_reload: yes
state: restarted

View File

@@ -0,0 +1,4 @@
---
- include: restart_sapp.yml
- include: restart_certstore.yml
- include: restart_tfe.yml

View File

@@ -0,0 +1,11 @@
- hosts:
- adc_mcn0
remote_user: root
tasks:
- name: 'telegraf_statistic service start'
systemd:
name: telegraf_statistic
enabled: yes
daemon_reload: yes
state: restarted

View File

@@ -0,0 +1,13 @@
- hosts:
- adc_mcn1
- adc_mcn2
- adc_mcn3
remote_user: root
tasks:
- name: 'tfe service start'
systemd:
name: tfe
enabled: yes
daemon_reload: yes
state: restarted

View File

@@ -0,0 +1,15 @@
- hosts:
- adc_mcn0
- adc_mcn1
- adc_mcn2
- adc_mcn3
remote_user: root
tasks:
- name: 'mcn* stop telegraf_collect service'
systemd:
name: telegraf_collect
state: stopped
enabled: no
- name: 'telegraf_collect config file and service file'
shell: rm /etc/telegraf/telegraf_collect.conf; rm /usr/lib/systemd/system/telegraf_collect.service; systemctl daemon-reload

View 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

View File

@@ -0,0 +1,26 @@
- hosts: adc_mxn
remote_user: root
tasks:
- name: "stop node-exporter service"
shell: systemctl stop node-exporter
ignore_errors: true
- name: "disable node-exporter service"
shell: systemctl disable node-exporter
ignore_errors: true
- name: "remove node-exporter service"
shell: rm /usr/lib/systemd/system/node-exporter.service
ignore_errors: true
- name: 'reset node-exporter in mxn'
shell: systemctl daemon-reload; systemctl reset-failed node-exporter
ignore_errors: true
- name: 'start adc-exporter-node service'
systemd:
name: adc-exporter-node
state: started
enabled: yes

View File

@@ -0,0 +1,14 @@
- hosts: adc_mcn3
remote_user: root
tasks:
- name: 'redis service stop'
systemd:
name: redis
enabled: no
daemon_reload: yes
state: stopped
- name: remove the redis40u
yum:
name: redis40u
state: absent

View File

@@ -0,0 +1,7 @@
- hosts: adc_mxn
remote_user: root
tasks:
- name: remove the node-exporter
yum:
name: node-exporter
state: absent

View File

@@ -0,0 +1,13 @@
- hosts: adc_mcn0
remote_user: root
tasks:
- name: "verify sapp md5 in mcn0"
shell: md5sum /home/mesasoft/sapp_run/sapp
register: sapp_md5sum
- name: assert
assert:
that:
- sapp_md5sum.stdout.find('1ca2eb92e4269066c6a056e41bb394b3') != -1
fail_msg: "FAIL"
success_msg: "PASS"

View File

@@ -0,0 +1,13 @@
- hosts: adc_mcn0
remote_user: root
tasks:
- name: "register systemctl status sapp result"
shell: systemctl status sapp
register: sapp_results
- name: assert
assert:
that:
- sapp_results.stdout.find('active (running)') != -1
fail_msg: "FAIL"
success_msg: "PASS"

View File

@@ -0,0 +1,16 @@
- hosts:
- adc_mcn1
- adc_mcn2
- adc_mcn3
remote_user: root
tasks:
- name: "register systemctl status tfe result"
shell: systemctl status tfe
register: tfe_results
- name: assert
assert:
that:
- tfe_results.stdout.find('active (running)') != -1
fail_msg: "FAIL"
success_msg: "PASS"

View File

@@ -0,0 +1,16 @@
- hosts:
- adc_mcn1
- adc_mcn2
- adc_mcn3
remote_user: root
tasks:
- name: "verify tfe md5 in mcn0"
shell: md5sum /opt/tsg/tfe/bin/tfe
register: tfe_md5sum
- name: assert
assert:
that:
- tfe_md5sum.stdout.find('0f45d2844dbff2edbde44bab0359cead') != -1
fail_msg: "FAIL"
success_msg: "PASS"

View File

@@ -0,0 +1,13 @@
- hosts: adc_mcn0
remote_user: root
tasks:
- name: "register tsg-diagnose exec result"
shell: docker exec -it unittest_tsg-diagnose /bin/sh -c 'python3 /root/unittest/tsg_diagnose.py'
register: tsgdiagnoseresults
- name: assert
assert:
that:
- tsgdiagnoseresults.stdout.find('FAIL') == -1
fail_msg: "FAIL"
success_msg: "PASS"

View File

@@ -0,0 +1,31 @@
- hosts: adc_mcn0
remote_user: root
tasks:
- name: 'mcn0 start tsg-diagnose service'
systemd:
name: tsg-diagnose
state: started
enabled: yes
- hosts: adc_mcn0
remote_user: root
tasks:
- name: "register tsg-diagnose exec result"
shell: docker exec -it unittest_tsg-diagnose /bin/sh -c 'python3 /root/unittest/tsg_diagnose.py'
register: tsgdiagnoseresults
- name: assert
assert:
that:
- tsgdiagnoseresults.stdout.find('FAIL') == -1
fail_msg: "FAIL"
success_msg: "PASS"
- hosts: adc_mcn0
remote_user: root
tasks:
- name: 'mcn0 stop tsg-diagnose service'
systemd:
name: tsg-diagnose
state: stopped
enabled: no