1、增加mrzcpd 对device list的支持
2、增加sapp 的internal 和external interface 的网卡list的支持 3、增加卸载部署脚本 4、增加查询指定rpm安装情况部署脚本
This commit is contained in:
41
tasks/collect/collect_rpm_info.yml
Normal file
41
tasks/collect/collect_rpm_info.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
- hosts: platform
|
||||
remote_user: root
|
||||
tasks:
|
||||
- name: "collect rpm info: excute shell to get rpm install info"
|
||||
shell: rpm -q {{item}}
|
||||
with_items:
|
||||
- libcjson
|
||||
- libdocumentanalyze
|
||||
- libmaatframe
|
||||
- libMESA_field_stat
|
||||
- libMESA_field_stat2
|
||||
- libMESA_handle_logger
|
||||
- libMESA_htable
|
||||
- libMESA_prof_load
|
||||
- librdkafka
|
||||
- librulescan
|
||||
- libtsglua
|
||||
- libwiredcfg
|
||||
- libWiredLB
|
||||
- lz4
|
||||
- libbreakpad_mini
|
||||
- dns
|
||||
- ftp
|
||||
- http
|
||||
- mail
|
||||
- quic
|
||||
- ssl
|
||||
- mrzcpd
|
||||
- sapp
|
||||
register: rpm_results
|
||||
ignore_errors: yes
|
||||
|
||||
- name: "collect rpm info: combine list format for output rpm install infomation"
|
||||
set_fact:
|
||||
install_info: '{{ install_info | default([]) + [{"name": item.item, "uninstall": item.failed, "version": item.stdout}] | list }}'
|
||||
with_items: "{{ rpm_results.results }}"
|
||||
|
||||
|
||||
- name: "collect rpm info: output rpm install infomation"
|
||||
debug:
|
||||
var: install_info
|
||||
14
tasks/unistall/uninstall_firewall.yml
Normal file
14
tasks/unistall/uninstall_firewall.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
- hosts: platform
|
||||
remote_user: root
|
||||
tasks:
|
||||
- name: "uninstall firewall: absent firewall rpm packages"
|
||||
yum:
|
||||
name: "{{ item }}"
|
||||
state: absent
|
||||
with_items:
|
||||
- dns
|
||||
- ftp
|
||||
- http
|
||||
- mail
|
||||
- quic
|
||||
- ssl
|
||||
24
tasks/unistall/uninstall_framework.yml
Normal file
24
tasks/unistall/uninstall_framework.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
- hosts: paltform
|
||||
remote_user: root
|
||||
tasks:
|
||||
- name: "uninstall framework: absent framework rpm packages"
|
||||
yum:
|
||||
name: "{{ item }}"
|
||||
state: absent
|
||||
#skip_broken: yes
|
||||
with_items:
|
||||
- libcjson
|
||||
- libdocumentanalyze
|
||||
- libmaatframe
|
||||
- libMESA_field_stat
|
||||
- libMESA_field_stat2
|
||||
- libMESA_handle_logger
|
||||
- libMESA_htable
|
||||
- libMESA_prof_load
|
||||
- librdkafka
|
||||
- librulescan
|
||||
- libtsglua
|
||||
- libwiredcfg
|
||||
- libWiredLB
|
||||
- lz4
|
||||
- libbreakpad_mini
|
||||
14
tasks/unistall/uninstall_mrzcpd.yml
Normal file
14
tasks/unistall/uninstall_mrzcpd.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
- hosts: platform
|
||||
remote_user: root
|
||||
tasks:
|
||||
- name: "uninstall mrzcpd: stop mrzcpd.service"
|
||||
systemd:
|
||||
name: "{{ item }}"
|
||||
state: stopped
|
||||
with_items:
|
||||
- mrzcpd.service
|
||||
|
||||
- name: "uninstall mrzcpd:absent mrzcpd rpm package"
|
||||
yum:
|
||||
name: mrzcpd
|
||||
state: absent
|
||||
5
tasks/unistall/uninstall_platform.yml
Normal file
5
tasks/unistall/uninstall_platform.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- include: uninstall_firewall.yml
|
||||
- include: uninstall_sapp.yml
|
||||
- include: uninstall_mrzcpd.yml
|
||||
- include: uninstall_framework.yml
|
||||
14
tasks/unistall/uninstall_sapp.yml
Normal file
14
tasks/unistall/uninstall_sapp.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
- hosts: platform
|
||||
remote_user: root
|
||||
tasks:
|
||||
- name: "uninstall sapp: stop sapp.service"
|
||||
systemd:
|
||||
name: "{{ item }}"
|
||||
state: stopped
|
||||
with_items:
|
||||
- sapp.service
|
||||
|
||||
- name: "uninstall sapp:absent sapp rpm package"
|
||||
yum:
|
||||
name: sapp
|
||||
state: absent
|
||||
Reference in New Issue
Block a user