1.backup origin deploy.yml to backup_deploy_yml_file

2.merge small task file to one directory
This commit is contained in:
fumingwei
2020-11-27 16:56:49 +06:00
parent 6fc0a90da7
commit cf2e80c4d7
31 changed files with 0 additions and 412 deletions

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