update
This commit is contained in:
82
uninstall/roles/package_list/20.06.1.yml
Normal file
82
uninstall/roles/package_list/20.06.1.yml
Normal file
@@ -0,0 +1,82 @@
|
||||
####################
|
||||
#marsio
|
||||
mrzcpd: mrzcpd-4.3.21.26314ca-1.el7.x86_64
|
||||
|
||||
####################
|
||||
#kernel
|
||||
origin_kernel: CentOS Linux (3.10.0-693.el7.x86_64) 7 (Core)
|
||||
#默认为CentOS 7.4内核,如果系统版本变更,请手动更改origin_kernel值
|
||||
|
||||
kernel_ml: kernel-ml-5.1.8-1.el7.elrepo.x86_64
|
||||
kernel_ml_devel: kernel-ml-devel-5.1.8-1.el7.elrepo.x86_64
|
||||
dkms: dkms-2.7.1-1.el7.noarch
|
||||
elfutils_libelf_devel: null
|
||||
pkgconfig: null
|
||||
zlib_devel: null
|
||||
|
||||
####################
|
||||
#framework
|
||||
libcjson: libcjson-1.7.8.542ad7f-1.x86_64
|
||||
libdocument: libdocumentanalyze-2.0.4.efdfc29-1.x86_64
|
||||
libmaatframe: libmaatframe-2.9.2.7519c63-1.x86_64
|
||||
libMESA_field_stat: libMESA_field_stat-1.0.1.852c2df-1.x86_64
|
||||
libMESA_field_stat2: libMESA_field_stat2-2.9.0.16ecf3b-1.x86_64
|
||||
libMESA_handle_logger: libMESA_handle_logger-1.0.9.304259e-1.x86_64
|
||||
libMESA_htable: libMESA_htable-3.10.11.6275308-1.x86_64
|
||||
libMESA_prof_load: libMESA_prof_load-1.0.5.bf755de-1.x86_64
|
||||
librdkafka: librdkafka-0.11.4-1.el7.x86_64
|
||||
librulescan: librulescan-2.2.0.900d2b3-1.x86_64
|
||||
libwiredcfg: libwiredcfg-2.0.2.7ce1eea-1.x86_64
|
||||
libWiredLB: libWiredLB-2.0.3.c7d131b-1.x86_64
|
||||
lz4: lz4-1.7.5-3.el7.x86_64
|
||||
|
||||
####################
|
||||
#sapp
|
||||
sapp: sapp-4.0.14.91cbc1b-1.x86_64
|
||||
|
||||
####################
|
||||
#tsg_master
|
||||
tsg_master: tsg_master-1.3.3.65833d7-1.x86_64
|
||||
|
||||
####################
|
||||
#kni
|
||||
kni: kni-20.06-1.el7.x86_64
|
||||
|
||||
####################
|
||||
#firewall
|
||||
capture_packet_plug: capture_packet_plug-debug-1.0.0.-1.el7.x86_64
|
||||
dns: dns-2.0.2.5effe72-1.x86_64
|
||||
ftp: ftp-1.0.4.5d3a283-1.x86_64
|
||||
http: http-2.0.1.e8f12ee-1.x86_64
|
||||
quic: quic-1.1.4.9c2e0ba-1.x86_64
|
||||
ssl: ssl-1.0.0.73e5273-1.x86_64
|
||||
mail: mail-1.0.3.cbc6034-1.x86_64
|
||||
fw_dns: fw_dns_plug-debug-1.0.3.ea8e0f6-1.el7.centos.x86_64
|
||||
fw_ftp: fw_ftp_plug-1.1.0.74c9a05-1.x86_6
|
||||
fw_http: fw_http_plug-1.2.0.a7e63c0-1.x86_64
|
||||
fw_quic: fw_quic_plug-1.0.1.e8cded4-1.x86_64
|
||||
fw_ssl: fw_ssl_plug-1.0.3.30fcf35-1.x86_64
|
||||
fw_mail: fw_mail_plug-1.1.0.a42c5a0-1.x86_64
|
||||
tsg_conn_record: tsg_conn_record-1.0.0.2155660-1.el7.centos.x86_64
|
||||
tsg_conn_sketch: null
|
||||
|
||||
####################
|
||||
#tfe
|
||||
tfe: tfe-4.3.5.0db794c-1.el7.x86_64
|
||||
tfe_kmod: tfe-kmod-v1.0.5.20200408-1dkms.noarch
|
||||
|
||||
####################
|
||||
#http_healthcheck
|
||||
http_healthcheck: http_healthcheck-20.04-1.el7.x86_64
|
||||
|
||||
#####################
|
||||
#clotho
|
||||
clotho: clotho-debug-1.0.0.-1.el7.x86_64
|
||||
|
||||
#####################
|
||||
#certstore
|
||||
certstore: certstore-2.1.2.0f61dde-1.el7.centos.x86_64
|
||||
|
||||
#####################
|
||||
#telegraf
|
||||
telegraf_statistic: telegraf-1.13.0-1.x86_64
|
||||
82
uninstall/roles/package_list/20.07.rc1.yml
Normal file
82
uninstall/roles/package_list/20.07.rc1.yml
Normal file
@@ -0,0 +1,82 @@
|
||||
####################
|
||||
#marsio
|
||||
mrzcpd: mrzcpd-4.3.25.d88306e-1.el7.x86_64
|
||||
|
||||
####################
|
||||
#kernel
|
||||
origin_kernel: CentOS Linux (3.10.0-693.el7.x86_64) 7 (Core)
|
||||
#默认为CentOS 7.4内核,如果系统版本变更,请手动更改origin_kernel值
|
||||
|
||||
kernel_ml: kernel-ml-5.1.8-1.el7.elrepo.x86_64
|
||||
kernel_ml_devel: kernel-ml-devel-5.1.8-1.el7.elrepo.x86_64
|
||||
dkms: dkms-2.7.1-1.el7.noarch
|
||||
elfutils_libelf_devel: null
|
||||
pkgconfig: null
|
||||
zlib_devel: null
|
||||
|
||||
####################
|
||||
#framework
|
||||
libcjson: libcjson-1.7.8.542ad7f-1.x86_64
|
||||
libdocument: libdocumentanalyze-2.0.4.efdfc29-1.x86_64
|
||||
libmaatframe: libmaatframe-3.0.2.dc1fced-1.x86_64
|
||||
libMESA_field_stat: libMESA_field_stat-1.0.1.852c2df-1.x86_64
|
||||
libMESA_field_stat2: libMESA_field_stat2-2.9.0.16ecf3b-1.x86_64
|
||||
libMESA_handle_logger: libMESA_handle_logger-1.0.9.304259e-1.x86_64
|
||||
libMESA_htable: libMESA_htable-3.10.11.6275308-1.x86_64
|
||||
libMESA_prof_load: libMESA_prof_load-1.0.5.bf755de-1.x86_64
|
||||
librdkafka: librdkafka-0.11.4-1.el7.x86_64
|
||||
librulescan: librulescan-2.2.0.900d2b3-1.x86_64
|
||||
libwiredcfg: libwiredcfg-2.0.2.7ce1eea-1.x86_64
|
||||
libWiredLB: libWiredLB-2.0.3.c7d131b-1.x86_64
|
||||
lz4: lz4-1.7.5-3.el7.x86_64
|
||||
|
||||
####################
|
||||
#sapp
|
||||
sapp: sapp-4.0.18.bb2effd-1.x86_64
|
||||
|
||||
####################
|
||||
#tsg_master
|
||||
tsg_master: tsg_master-3.0.3.3c9cf15-1.x86_64
|
||||
|
||||
####################
|
||||
#kni
|
||||
kni: kni-20.07-1.el7.x86_64
|
||||
|
||||
####################
|
||||
#firewall
|
||||
capture_packet_plug: capture_packet_plug-3.0.2.09f193c-1.x86_64
|
||||
dns: dns-2.0.6.d8317e9-1.x86_64
|
||||
ftp: ftp-1.0.6.2710506-1.x86_64
|
||||
http: http-2.0.3.9218b4b-1.x86_64
|
||||
quic: quic-1.1.6.d6755d8-1.x86_64
|
||||
ssl: ssl-1.0.3.e8482a4-1.x86_64
|
||||
mail: mail-1.0.7.9e3be05-1.x86_64
|
||||
fw_dns: fw_dns_plug-3.0.0.0a5d574-1.x86_64
|
||||
fw_ftp: fw_ftp_plug-3.0.0.7a867ea-1.x86_64
|
||||
fw_http: fw_http_plug-3.0.0.1ca1c65-1.x86_64
|
||||
fw_quic: fw_quic_plug-3.0.0.b06d39c-1.x86_64
|
||||
fw_ssl: fw_ssl_plug-3.0.0.3a29c3f-1.x86_64
|
||||
fw_mail: fw_mail_plug-3.0.0.3b4e481-1.x86_64
|
||||
tsg_conn_record: tsg_conn_record-1.0.0.2155660-1.el7.centos.x86_64
|
||||
tsg_conn_sketch: tsg_conn_sketch-2.0.v2.0_alpha.af621ca-1.x86_64
|
||||
|
||||
####################
|
||||
#tfe
|
||||
tfe: tfe-4.3.7.39bff00-1.el7.x86_64
|
||||
tfe_kmod: tfe-kmod-v1.0.5.20200408-1dkms.noarch
|
||||
|
||||
####################
|
||||
#http_healthcheck
|
||||
http_healthcheck: http_healthcheck-20.04-1.el7.x86_64
|
||||
|
||||
#####################
|
||||
#clotho
|
||||
clotho: clotho-debug-1.0.0.-1.el7.x86_64
|
||||
|
||||
#####################
|
||||
#certstore
|
||||
certstore: certstore-2.1.2.0f61dde-1.el7.centos.x86_64
|
||||
|
||||
#####################
|
||||
#telegraf
|
||||
telegraf_statistic: telegraf-1.13.0-1.x86_64
|
||||
82
uninstall/roles/package_list/20.07.yml
Normal file
82
uninstall/roles/package_list/20.07.yml
Normal file
@@ -0,0 +1,82 @@
|
||||
####################
|
||||
#marsio
|
||||
mrzcpd: mrzcpd-4.3.25.d88306e-1.el7.x86_64
|
||||
|
||||
####################
|
||||
#kernel
|
||||
origin_kernel: CentOS Linux (3.10.0-693.el7.x86_64) 7 (Core)
|
||||
#默认为CentOS 7.4内核,如果系统版本变更,请手动更改origin_kernel值
|
||||
|
||||
kernel_ml: kernel-ml-5.1.8-1.el7.elrepo.x86_64
|
||||
kernel_ml_devel: kernel-ml-devel-5.1.8-1.el7.elrepo.x86_64
|
||||
dkms: dkms-2.7.1-1.el7.noarch
|
||||
elfutils_libelf_devel: null
|
||||
pkgconfig: null
|
||||
zlib_devel: null
|
||||
|
||||
####################
|
||||
#framework
|
||||
libcjson: libcjson-1.7.8.542ad7f-1.x86_64
|
||||
libdocument: libdocumentanalyze-2.0.4.efdfc29-1.x86_64
|
||||
libmaatframe: libmaatframe-3.0.2.dc1fced-1.x86_64
|
||||
libMESA_field_stat: libMESA_field_stat-1.0.1.852c2df-1.x86_64
|
||||
libMESA_field_stat2: libMESA_field_stat2-2.9.0.16ecf3b-1.x86_64
|
||||
libMESA_handle_logger: libMESA_handle_logger-1.0.9.304259e-1.x86_64
|
||||
libMESA_htable: libMESA_htable-3.10.11.6275308-1.x86_64
|
||||
libMESA_prof_load: libMESA_prof_load-1.0.5.bf755de-1.x86_64
|
||||
librdkafka: librdkafka-0.11.4-1.el7.x86_64
|
||||
librulescan: librulescan-2.2.0.900d2b3-1.x86_64
|
||||
libwiredcfg: libwiredcfg-2.0.2.7ce1eea-1.x86_64
|
||||
libWiredLB: libWiredLB-2.0.3.c7d131b-1.x86_64
|
||||
lz4: lz4-1.7.5-3.el7.x86_64
|
||||
|
||||
####################
|
||||
#sapp
|
||||
sapp: sapp-4.0.18.bb2effd-1.x86_64
|
||||
|
||||
####################
|
||||
#tsg_master
|
||||
tsg_master: tsg_master-3.0.4.40fa047-1.x86_64
|
||||
|
||||
####################
|
||||
#kni
|
||||
kni: kni-20.07-1.el7.x86_64
|
||||
|
||||
####################
|
||||
#firewall
|
||||
capture_packet_plug: capture_packet_plug-3.0.2.09f193c-1.x86_64
|
||||
dns: dns-2.0.6.d8317e9-1.x86_64
|
||||
ftp: ftp-1.0.6.2710506-1.x86_64
|
||||
http: http-2.0.3.9218b4b-1.x86_64
|
||||
quic: quic-1.1.6.d6755d8-1.x86_64
|
||||
ssl: ssl-1.0.3.e8482a4-1.x86_64
|
||||
mail: mail-1.0.7.9e3be05-1.x86_64
|
||||
fw_dns: fw_dns_plug-3.0.0.0a5d574-1.x86_64
|
||||
fw_ftp: fw_ftp_plug-3.0.0.7a867ea-1.x86_64
|
||||
fw_http: fw_http_plug-3.0.0.1ca1c65-1.x86_64
|
||||
fw_quic: fw_quic_plug-3.0.0.b06d39c-1.x86_64
|
||||
fw_ssl: fw_ssl_plug-3.0.1.7ea9976-1.x86_64
|
||||
fw_mail: fw_mail_plug-3.0.0.3b4e481-1.x86_64
|
||||
tsg_conn_record: tsg_conn_record-1.0.0.2155660-1.el7.centos.x86_64
|
||||
tsg_conn_sketch: tsg_conn_sketch-2.0.v2.0_alpha.af621ca-1.x86_64
|
||||
|
||||
####################
|
||||
#tfe
|
||||
tfe: tfe-4.3.8.11b62a2-1.el7.x86_64
|
||||
tfe_kmod: tfe-kmod-v1.0.5.20200408-1dkms.noarch
|
||||
|
||||
####################
|
||||
#http_healthcheck
|
||||
http_healthcheck: http_healthcheck-20.04-1.el7.x86_64
|
||||
|
||||
#####################
|
||||
#clotho
|
||||
clotho: clotho-debug-1.0.0.-1.el7.x86_64
|
||||
|
||||
#####################
|
||||
#certstore
|
||||
certstore: certstore-2.1.2.0f61dde-1.el7.centos.x86_64
|
||||
|
||||
#####################
|
||||
#telegraf
|
||||
telegraf_statistic: telegraf-1.13.0-1.x86_64
|
||||
82
uninstall/roles/package_list/20.08.yml
Normal file
82
uninstall/roles/package_list/20.08.yml
Normal file
@@ -0,0 +1,82 @@
|
||||
####################
|
||||
#marsio
|
||||
mrzcpd: mrzcpd-4.3.25.d88306e-1.el7.x86_64
|
||||
|
||||
####################
|
||||
#kernel
|
||||
origin_kernel: CentOS Linux (3.10.0-693.el7.x86_64) 7 (Core)
|
||||
#默认为CentOS 7.4内核,如果系统版本变更,请手动更改origin_kernel值
|
||||
|
||||
kernel_ml: kernel-ml-5.1.8-1.el7.elrepo.x86_64
|
||||
kernel_ml_devel: kernel-ml-devel-5.1.8-1.el7.elrepo.x86_64
|
||||
dkms: dkms-2.7.1-1.el7.noarch
|
||||
elfutils_libelf_devel: elfutils-libelf-devel-0.168-8.el7.x86_64
|
||||
pkgconfig: pkgconfig-0.27.1-4.el7.x86_64
|
||||
zlib_devel: zlib-devel-1.2.7-17.el7.x86_64
|
||||
|
||||
####################
|
||||
#framework
|
||||
libcjson: libcjson-1.7.8.542ad7f-1.x86_64
|
||||
libdocument: libdocumentanalyze-2.0.4.efdfc29-1.x86_64
|
||||
libmaatframe: libmaatframe-3.0.3.5931b44-1.x86_64
|
||||
libMESA_field_stat: libMESA_field_stat-1.0.1.852c2df-1.x86_64
|
||||
libMESA_field_stat2: libMESA_field_stat2-2.9.0.16ecf3b-1.x86_64
|
||||
libMESA_handle_logger: libMESA_handle_logger-1.0.9.304259e-1.x86_64
|
||||
libMESA_htable: libMESA_htable-3.10.11.6275308-1.x86_64
|
||||
libMESA_prof_load: libMESA_prof_load-1.0.5.bf755de-1.x86_64
|
||||
librdkafka: librdkafka-0.11.4-1.el7.x86_64
|
||||
librulescan: librulescan-2.2.0.900d2b3-1.x86_64
|
||||
libwiredcfg: libwiredcfg-2.0.2.7ce1eea-1.x86_64
|
||||
libWiredLB: libWiredLB-2.0.3.c7d131b-1.x86_64
|
||||
lz4: lz4-1.7.5-3.el7.x86_64
|
||||
|
||||
####################
|
||||
#sapp
|
||||
sapp: sapp-4.0.20.b59c12a-1.x86_64
|
||||
|
||||
####################
|
||||
#tsg_master
|
||||
tsg_master: tsg_master-3.1.2.7002e1b-1.x86_64
|
||||
|
||||
####################
|
||||
#kni
|
||||
kni: kni-20.07-1.el7.x86_64
|
||||
|
||||
####################
|
||||
#firewall
|
||||
capture_packet_plug: capture_packet_plug-3.0.2.09f193c-1.x86_64
|
||||
dns: dns-2.0.6.d8317e9-1.x86_64
|
||||
ftp: ftp-1.0.6.2710506-1.x86_64
|
||||
http: http-2.0.3.9218b4b-1.x86_64
|
||||
quic: quic-1.1.6.d6755d8-1.x86_64
|
||||
ssl: ssl-1.0.3.e8482a4-1.x86_64
|
||||
mail: mail-1.0.7.9e3be05-1.x86_64
|
||||
fw_dns: fw_dns_plug-3.0.0.0a5d574-1.x86_64
|
||||
fw_ftp: fw_ftp_plug-3.0.0.7a867ea-1.x86_64
|
||||
fw_http: fw_http_plug-3.0.0.1ca1c65-1.x86_64
|
||||
fw_quic: fw_quic_plug-3.0.0.b06d39c-1.x86_64
|
||||
fw_ssl: fw_ssl_plug-3.0.1.7ea9976-1.x86_64
|
||||
fw_mail: fw_mail_plug-3.0.0.3b4e481-1.x86_64
|
||||
tsg_conn_record: tsg_conn_record-1.0.2.2afb19a-1.x86_64
|
||||
tsg_conn_sketch: tsg_conn_sketch-2.0.v2.0_alpha.af621ca-1.x86_64
|
||||
|
||||
####################
|
||||
#tfe
|
||||
tfe: tfe-4.3.9.4d7957e-1.el7.x86_64
|
||||
tfe_kmod: tfe-kmod-v1.0.5.20200408-1dkms.noarch
|
||||
|
||||
####################
|
||||
#http_healthcheck
|
||||
http_healthcheck: http_healthcheck-20.04-1.el7.x86_64
|
||||
|
||||
#####################
|
||||
#clotho
|
||||
clotho: clotho-debug-1.0.0.-1.el7.x86_64
|
||||
|
||||
#####################
|
||||
#certstore
|
||||
certstore: certstore-2.1.2.20200828.f507b3e-1.el7.x86_64
|
||||
|
||||
#####################
|
||||
#telegraf
|
||||
telegraf_statistic: telegraf-1.13.0-1.x86_64
|
||||
504
uninstall/roles/uninstall_adc_mcn0/tasks/main.yml
Normal file
504
uninstall/roles/uninstall_adc_mcn0/tasks/main.yml
Normal file
@@ -0,0 +1,504 @@
|
||||
####################
|
||||
#Uninstall Kernel
|
||||
- name: "reset default kernel"
|
||||
shell: grub2-set-default '{{ origin_kernel }}'
|
||||
when: uninstall.kernel == 1
|
||||
|
||||
- name: "reboot"
|
||||
reboot:
|
||||
when: uninstall.kernel == 1
|
||||
|
||||
- name: "uninstall tfe-kmod and kernel"
|
||||
yum:
|
||||
name:
|
||||
- "{{ tfe_kmod }}"
|
||||
- "{{ dkms }}"
|
||||
- "{{ kernel_ml }}"
|
||||
- "{{ kernel_ml_devel }}"
|
||||
- "{{ elfutils_libelf_devel }}"
|
||||
- "{{ zlib_devel }}"
|
||||
state: absent
|
||||
when: uninstall.kernel == 1
|
||||
ignore_errors: true
|
||||
|
||||
####################
|
||||
#Uninstall Marsio
|
||||
- name: stop mrzcpd
|
||||
systemd:
|
||||
name: mrzcpd
|
||||
state: stopped
|
||||
enabled: no
|
||||
when:
|
||||
- backup.marsio == 1
|
||||
- uninstall.marsio == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: stop mrtunnat
|
||||
systemd:
|
||||
name: mrtunnat
|
||||
state: stopped
|
||||
enabled: no
|
||||
when:
|
||||
- backup.marsio == 1
|
||||
- uninstall.marsio == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: create backup_dest_path
|
||||
file:
|
||||
path: "{{ backup_dest_path }}"
|
||||
state: directory
|
||||
when: backup.marsio == 1
|
||||
|
||||
- name: backup /opt/mrzcpd to destination path
|
||||
archive:
|
||||
path: /opt/mrzcpd
|
||||
dest: "{{ backup_dest_path }}/mrzcpd_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when: backup.marsio == 1
|
||||
|
||||
- name: uninstall mrzcpd
|
||||
yum:
|
||||
name:
|
||||
- "{{ mrzcpd }}"
|
||||
state: absent
|
||||
when: uninstall.marsio == 1
|
||||
|
||||
- name: remove marsio files
|
||||
file:
|
||||
path: /opt/mrzcpd
|
||||
state: absent
|
||||
when: remove.marsio == 1
|
||||
|
||||
- name: remove mrzcpd.service
|
||||
file:
|
||||
path: /usr/lib/systemd/system/mrzcpd.service
|
||||
state: absent
|
||||
when: remove.marsio == 1
|
||||
|
||||
- name: remove mrtunnat.service
|
||||
file:
|
||||
path: /usr/lib/systemd/system/mrtunnat.service
|
||||
state: absent
|
||||
when: remove.marsio == 1
|
||||
|
||||
####################
|
||||
#Uninstall kni
|
||||
- name: stop sapp
|
||||
systemd:
|
||||
name: sapp
|
||||
state: stopped
|
||||
enabled: no
|
||||
when:
|
||||
- backup.kni == 1
|
||||
- uninstall.kni == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: create backup_dest_path
|
||||
file:
|
||||
path: "{{ backup_dest_path }}"
|
||||
state: directory
|
||||
when: backup.kni == 1
|
||||
|
||||
- name: backup sapp_run/etc/kni/ to destination path
|
||||
archive:
|
||||
path: /home/mesasoft/sapp_run/etc/kni
|
||||
dest: "{{ backup_dest_path }}/kni_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when: backup.kni == 1
|
||||
|
||||
- name: backup sapp_run/plug to destination path
|
||||
archive:
|
||||
path: /home/mesasoft/sapp_run/plug
|
||||
dest: "{{ backup_dest_path }}/sapp_plug_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when: backup.sapp_plug == 1
|
||||
|
||||
- name: "judge plug.zip"
|
||||
shell: "ls {{ backup_dest_path }}/sapp_plug_{{ uninstall_version }}_{{ date }}.zip"
|
||||
register: return
|
||||
ignore_errors: true
|
||||
|
||||
- name: uninstall kni
|
||||
yum:
|
||||
name:
|
||||
- "{{ kni }}"
|
||||
state: absent
|
||||
when: uninstall.kni == 1
|
||||
|
||||
- name: remove kni files
|
||||
file:
|
||||
path: /home/mesasoft/sapp_run/etc/kni/
|
||||
state: absent
|
||||
when: remove.kni == 1
|
||||
|
||||
####################
|
||||
#Uninstall tsg_master
|
||||
- name: stop sapp
|
||||
systemd:
|
||||
name: sapp
|
||||
state: stopped
|
||||
enabled: no
|
||||
when:
|
||||
- backup.sapp_tsgconf == 1
|
||||
- uninstall.tsgmaster == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: create backup_dest_path
|
||||
file:
|
||||
path: "{{ backup_dest_path }}"
|
||||
state: directory
|
||||
when: backup.sapp_tsgconf == 1
|
||||
|
||||
- name: backup sapp_run/tsgconf/ to destination path
|
||||
archive:
|
||||
path: /home/mesasoft/sapp_run/tsgconf
|
||||
dest: "{{ backup_dest_path }}/tsgconf_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when: backup.sapp_tsgconf == 1
|
||||
|
||||
- name: backup sapp_run/plug to destination path
|
||||
archive:
|
||||
path: /home/mesasoft/sapp_run/plug
|
||||
dest: "{{ backup_dest_path }}/sapp_plug_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when:
|
||||
- backup.sapp_plug == 1
|
||||
- return.rc != 0
|
||||
|
||||
- name: uninstall tsg_master
|
||||
yum:
|
||||
name:
|
||||
- "{{ tsg_master }}"
|
||||
state: absent
|
||||
when: uninstall.tsgmaster == 1
|
||||
|
||||
####################
|
||||
#Uninstall firewall
|
||||
- name: stop sapp
|
||||
systemd:
|
||||
name: sapp
|
||||
state: stopped
|
||||
enabled: no
|
||||
when:
|
||||
- backup.sapp_conf == 1
|
||||
- uninstall.firewall == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: create backup_dest_path
|
||||
file:
|
||||
path: "{{ backup_dest_path }}"
|
||||
state: directory
|
||||
when: backup.sapp_conf == 1
|
||||
|
||||
- name: create /home/mesasoft/sapp_runetc/
|
||||
file:
|
||||
path: /home/mesasoft/sapp_runetc/
|
||||
state: directory
|
||||
when: backup.sapp_conf == 1
|
||||
|
||||
- name: create entrylist.conf
|
||||
file:
|
||||
path: /home/mesasoft/sapp_runetc/entrylist.conf
|
||||
state: touch
|
||||
when: backup.sapp_conf == 1
|
||||
|
||||
- name: backup sapp_run/conf/ to destination path
|
||||
archive:
|
||||
path: /home/mesasoft/sapp_run/conf
|
||||
dest: "{{ backup_dest_path }}/sapp_conf_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when: backup.sapp_conf == 1
|
||||
|
||||
- name: backup sapp_run/plug to destination path
|
||||
archive:
|
||||
path: /home/mesasoft/sapp_run/plug
|
||||
dest: "{{ backup_dest_path }}/sapp_plug_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when:
|
||||
- backup.sapp_plug == 1
|
||||
- return.rc != 0
|
||||
|
||||
- name: uninstall firewall
|
||||
yum:
|
||||
name:
|
||||
- "{{ capture_packet_plug }}"
|
||||
- "{{ dns }}"
|
||||
- "{{ ftp }}"
|
||||
- "{{ http }}"
|
||||
- "{{ quic }}"
|
||||
- "{{ ssl }}"
|
||||
- "{{ mail }}"
|
||||
- "{{ fw_dns }}"
|
||||
- "{{ fw_ftp }}"
|
||||
- "{{ fw_http }}"
|
||||
- "{{ fw_ssl }}"
|
||||
- "{{ fw_mail }}"
|
||||
- "{{ tsg_conn_record }}"
|
||||
state: absent
|
||||
when: uninstall.firewall == 1
|
||||
|
||||
- name: uninstall firewall
|
||||
yum:
|
||||
name:
|
||||
- "{{ fw_quic }}"
|
||||
- "{{ tsg_conn_sketch }}"
|
||||
state: absent
|
||||
when: uninstall.firewall == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: remove /home/mesasoft/sapp_runetc
|
||||
file:
|
||||
path: /home/mesasoft/sapp_runetc
|
||||
state: absent
|
||||
when: uninstall.firewall == 1
|
||||
|
||||
####################
|
||||
#Uninstall sapp
|
||||
- name: stop sapp
|
||||
systemd:
|
||||
name: sapp
|
||||
state: stopped
|
||||
enabled: no
|
||||
when:
|
||||
- backup.sapp_etc == 1
|
||||
- uninstall.sapp == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: create backup_dest_path
|
||||
file:
|
||||
path: "{{ backup_dest_path }}"
|
||||
state: directory
|
||||
when: backup.sapp_etc == 1
|
||||
|
||||
- name: backup sapp_run/etc to destination path
|
||||
archive:
|
||||
path: /home/mesasoft/sapp_run/etc
|
||||
dest: "{{ backup_dest_path }}/sapp_etc_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when: backup.sapp_etc == 1
|
||||
|
||||
- name: uninstall sapp
|
||||
yum:
|
||||
name:
|
||||
- "{{ sapp }}"
|
||||
state: absent
|
||||
when: uninstall.sapp == 1
|
||||
|
||||
#- name: remove /home/mesasoft/sapp_run
|
||||
# file:
|
||||
# path: /home/mesasoft/sapp_run
|
||||
# state: absent
|
||||
# when:
|
||||
# - remove.sapp == 1
|
||||
# - backup.sapp_plug == 1
|
||||
# - backup.sapp_tsgconf == 1
|
||||
# - backup.sapp_etc == 1
|
||||
# - backup.sapp_conf == 1
|
||||
|
||||
- name: remove sapp.service
|
||||
file:
|
||||
path: /usr/lib/systemd/system/sapp.service
|
||||
state: absent
|
||||
when: remove.sapp == 1
|
||||
|
||||
####################
|
||||
#Uninstall Certstore
|
||||
- name: stop certstore
|
||||
systemd:
|
||||
name: certstore
|
||||
state: stopped
|
||||
enabled: no
|
||||
when:
|
||||
- backup.certstore == 1
|
||||
- uninstall.certstore == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: create backup_dest_path
|
||||
file:
|
||||
path: "{{ backup_dest_path }}"
|
||||
state: directory
|
||||
when: backup.certstore == 1
|
||||
|
||||
- name: backup /home/tsg/certstore to destination path
|
||||
archive:
|
||||
path: /home/tsg/certstore
|
||||
dest: "{{ backup_dest_path }}/certstore_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when: backup.certstore == 1
|
||||
|
||||
- name: uninstall certstore
|
||||
yum:
|
||||
name:
|
||||
- "{{ certstore }}"
|
||||
state: absent
|
||||
when: uninstall.certstore == 1
|
||||
|
||||
- name: remove certstore files
|
||||
file:
|
||||
path: /home/tsg/certstore
|
||||
state: absent
|
||||
when: remove.certstore == 1
|
||||
|
||||
- name: remove certstore.service
|
||||
file:
|
||||
path: /usr/lib/systemd/system/certstore.service
|
||||
state: absent
|
||||
when: remove.certstore == 1
|
||||
|
||||
####################
|
||||
#Uninstall cert-redis
|
||||
- name: stop cert-redis
|
||||
systemd:
|
||||
name: cert-redis
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: uninstall.certredis == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: remove cert-redis files
|
||||
file:
|
||||
path: /home/tsg/cert-redis
|
||||
state: absent
|
||||
when: remove.certredis == 1
|
||||
|
||||
####################
|
||||
#Uninstall clotho
|
||||
- name: stop clotho
|
||||
systemd:
|
||||
name: clotho
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: uninstall.clotho == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: uninstall clotho
|
||||
yum:
|
||||
name:
|
||||
- "{{ clotho }}"
|
||||
state: absent
|
||||
when: uninstall.clotho == 1
|
||||
|
||||
- name: remove clotho files
|
||||
file:
|
||||
path: /home/mesasoft/clotho
|
||||
state: absent
|
||||
when: remove.clotho == 1
|
||||
|
||||
- name: remove clotho.service
|
||||
file:
|
||||
path: /usr/lib/systemd/system/clotho.service
|
||||
state: absent
|
||||
when: remove.clotho == 1
|
||||
|
||||
####################
|
||||
#Uninstall http_healthcheck
|
||||
- name: uninstall http_healthcheck
|
||||
yum:
|
||||
name:
|
||||
- "{{ http_healthcheck }}"
|
||||
state: absent
|
||||
when: uninstall.http_healthcheck == 1
|
||||
|
||||
- name: remove http_healthcheck files
|
||||
file:
|
||||
path: /home/mesasoft/http_healthcheck
|
||||
state: absent
|
||||
when: remove.http_healthcheck == 1
|
||||
|
||||
####################
|
||||
#Uninstall framework
|
||||
- name: create backup_dest_path
|
||||
file:
|
||||
path: "{{ backup_dest_path }}"
|
||||
state: directory
|
||||
when: backup.framework == 1
|
||||
|
||||
- name: backup /home/tsg/certstore to destination path
|
||||
archive:
|
||||
path: /opt/MESA
|
||||
dest: "{{ backup_dest_path }}/opt_MESA_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when: backup.framework == 1
|
||||
|
||||
- name: uninstall framework
|
||||
yum:
|
||||
name:
|
||||
- "{{ libcjson }}"
|
||||
- "{{ libdocument }}"
|
||||
- "{{ libmaatframe }}"
|
||||
- "{{ libMESA_field_stat }}"
|
||||
- "{{ libMESA_field_stat2 }}"
|
||||
- "{{ libMESA_handle_logger }}"
|
||||
- "{{ libMESA_htable }}"
|
||||
- "{{ libMESA_prof_load }}"
|
||||
- "{{ librdkafka }}"
|
||||
- "{{ librulescan }}"
|
||||
- "{{ libwiredcfg }}"
|
||||
- "{{ libWiredLB }}"
|
||||
- "{{ lz4 }}"
|
||||
state: absent
|
||||
when: uninstall.framework == 1
|
||||
|
||||
- name: remove framework files
|
||||
file:
|
||||
path: /opt/MESA
|
||||
state: absent
|
||||
when: remove.framework == 1
|
||||
|
||||
####################
|
||||
#Uninstall telegraf_statistic
|
||||
- name: stop telegraf_statistic
|
||||
systemd:
|
||||
name: telegraf_statistic
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: uninstall.telegraf_statistic == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: uninstall telegraf_statistic
|
||||
yum:
|
||||
name:
|
||||
- "{{ telegraf_statistic }}"
|
||||
state: absent
|
||||
when: uninstall.telegraf_statistic == 1
|
||||
|
||||
- name: remove telegraf_statistic files
|
||||
file:
|
||||
path: /etc/telegraf/telegraf_statistic.conf
|
||||
state: absent
|
||||
when: remove.telegraf_statistic == 1
|
||||
|
||||
- name: remove /tmp/metrics.out
|
||||
file:
|
||||
path: /tmp/metrics.out
|
||||
state: absent
|
||||
when: remove.telegraf_statistic == 1
|
||||
|
||||
####################
|
||||
#Remove other tsg files
|
||||
- name: remove /home/mesasoft
|
||||
file:
|
||||
path: /home/mesasoft
|
||||
state: absent
|
||||
when:
|
||||
- remove.kni == 1
|
||||
- remove.sapp == 1
|
||||
- remove.clotho == 1
|
||||
|
||||
- name: remove /home/tsg
|
||||
file:
|
||||
path: /home/tsg
|
||||
state: absent
|
||||
when:
|
||||
- remove.certstore == 1
|
||||
- remove.certredis == 1
|
||||
|
||||
- name: remove /opt/proxy_status
|
||||
file:
|
||||
path: /opt/proxy_status
|
||||
state: absent
|
||||
|
||||
- name: remove /tmp/ansible_deploy
|
||||
file:
|
||||
path: /tmp/ansible_deploy
|
||||
state: absent
|
||||
189
uninstall/roles/uninstall_adc_mcn123/tasks/main.yml
Normal file
189
uninstall/roles/uninstall_adc_mcn123/tasks/main.yml
Normal file
@@ -0,0 +1,189 @@
|
||||
####################
|
||||
#Uninstall Kernel
|
||||
- name: "reset default kernel"
|
||||
shell: grub2-set-default '{{ origin_kernel }}'
|
||||
when: uninstall.kernel == 1
|
||||
|
||||
- name: "reboot"
|
||||
reboot:
|
||||
when: uninstall.kernel == 1
|
||||
|
||||
- name: "uninstall tfe-kmod and kernel"
|
||||
yum:
|
||||
name:
|
||||
- "{{ tfe_kmod }}"
|
||||
- "{{ dkms }}"
|
||||
- "{{ kernel_ml }}"
|
||||
- "{{ kernel_ml_devel }}"
|
||||
- "{{ elfutils_libelf_devel }}"
|
||||
- "{{ zlib_devel }}"
|
||||
state: absent
|
||||
when: uninstall.kernel == 1
|
||||
ignore_errors: true
|
||||
|
||||
####################
|
||||
#Uninstall Marsio
|
||||
- name: stop mrzcpd
|
||||
systemd:
|
||||
name: mrzcpd
|
||||
state: stopped
|
||||
enabled: no
|
||||
when:
|
||||
- backup.marsio == 1
|
||||
- uninstall.marsio == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: stop mrtunnat
|
||||
systemd:
|
||||
name: mrtunnat
|
||||
state: stopped
|
||||
enabled: no
|
||||
when:
|
||||
- backup.marsio == 1
|
||||
- uninstall.marsio == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: create backup_dest_path
|
||||
file:
|
||||
path: "{{ backup_dest_path }}"
|
||||
state: directory
|
||||
when: backup.marsio == 1
|
||||
|
||||
- name: backup /opt/mrzcpd to destination path
|
||||
archive:
|
||||
path: /opt/mrzcpd
|
||||
dest: "{{ backup_dest_path }}/mrzcpd_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when: backup.marsio == 1
|
||||
|
||||
- name: uninstall mrzcpd
|
||||
yum:
|
||||
name:
|
||||
- "{{ mrzcpd }}"
|
||||
state: absent
|
||||
when: uninstall.marsio == 1
|
||||
|
||||
- name: remove marsio files
|
||||
file:
|
||||
path: /opt/mrzcpd
|
||||
state: absent
|
||||
when: remove.marsio == 1
|
||||
|
||||
- name: remove mrzcpd.service
|
||||
file:
|
||||
path: /usr/lib/systemd/system/mrzcpd.service
|
||||
state: absent
|
||||
when: remove.marsio == 1
|
||||
|
||||
- name: remove mrtunnat.service
|
||||
file:
|
||||
path: /usr/lib/systemd/system/mrtunnat.service
|
||||
state: absent
|
||||
when: remove.marsio == 1
|
||||
|
||||
####################
|
||||
#Uninstall tfe
|
||||
- name: stop tfe
|
||||
systemd:
|
||||
name: tfe
|
||||
state: stopped
|
||||
enabled: no
|
||||
when:
|
||||
- backup.tfe == 1
|
||||
- uninstall.tfe == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: stop tfe-env
|
||||
systemd:
|
||||
name: tfe-env
|
||||
state: stopped
|
||||
enabled: no
|
||||
when:
|
||||
- backup.tfe == 1
|
||||
- uninstall.tfe == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: create backup_dest_path
|
||||
file:
|
||||
path: "{{ backup_dest_path }}"
|
||||
state: directory
|
||||
when: backup.tfe == 1
|
||||
|
||||
- name: backup /opt/tsg/tfe/conf to destination path
|
||||
archive:
|
||||
path: /opt/tsg/tfe/conf
|
||||
dest: "{{ backup_dest_path }}/tfe_conf_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when: backup.tfe == 1
|
||||
|
||||
- name: uninstall tfe
|
||||
yum:
|
||||
name:
|
||||
- "{{ tfe }}"
|
||||
state: absent
|
||||
when: uninstall.tfe == 1
|
||||
|
||||
- name: remove /opt/tsg/tfe
|
||||
file:
|
||||
path: /opt/tsg/tfe
|
||||
state: absent
|
||||
when: remove.tfe == 1
|
||||
|
||||
- name: remove tfe.service
|
||||
file:
|
||||
path: /usr/lib/systemd/system/tfe.service
|
||||
state: absent
|
||||
when: remove.tfe == 1
|
||||
|
||||
- name: remove tfe-env.service
|
||||
file:
|
||||
path: /usr/lib/systemd/system/tfe-env.service
|
||||
state: absent
|
||||
when: remove.tfe == 1
|
||||
|
||||
- name: remove tfe-env-tun-mode.service
|
||||
file:
|
||||
path: /usr/lib/systemd/system/tfe-env-tun-mode.service
|
||||
state: absent
|
||||
when: remove.tfe == 1
|
||||
|
||||
####################
|
||||
#Uninstall framework
|
||||
- name: create backup_dest_path
|
||||
file:
|
||||
path: "{{ backup_dest_path }}"
|
||||
state: directory
|
||||
when: backup.framework == 1
|
||||
|
||||
- name: backup /home/tsg/certstore to destination path
|
||||
archive:
|
||||
path: /opt/MESA
|
||||
dest: "{{ backup_dest_path }}/opt_MESA_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when: backup.framework == 1
|
||||
|
||||
- name: uninstall framework
|
||||
yum:
|
||||
name:
|
||||
- "{{ libcjson }}"
|
||||
- "{{ libdocument }}"
|
||||
- "{{ libmaatframe }}"
|
||||
- "{{ libMESA_field_stat }}"
|
||||
- "{{ libMESA_field_stat2 }}"
|
||||
- "{{ libMESA_handle_logger }}"
|
||||
- "{{ libMESA_htable }}"
|
||||
- "{{ libMESA_prof_load }}"
|
||||
- "{{ librdkafka }}"
|
||||
- "{{ librulescan }}"
|
||||
- "{{ libwiredcfg }}"
|
||||
- "{{ libWiredLB }}"
|
||||
- "{{ lz4 }}"
|
||||
state: absent
|
||||
when: uninstall.framework == 1
|
||||
|
||||
- name: remove framework files
|
||||
file:
|
||||
path: /opt/MESA
|
||||
state: absent
|
||||
when: remove.framework == 1
|
||||
|
||||
570
uninstall/roles/uninstall_server/tasks/main.yml
Normal file
570
uninstall/roles/uninstall_server/tasks/main.yml
Normal file
@@ -0,0 +1,570 @@
|
||||
####################
|
||||
#Uninstall Kernel
|
||||
- name: "reset default kernel"
|
||||
shell: grub2-set-default '{{ origin_kernel }}'
|
||||
when: uninstall.kernel == 1
|
||||
|
||||
- name: "reboot"
|
||||
reboot:
|
||||
when: uninstall.kernel == 1
|
||||
|
||||
- name: "uninstall tfe-kmod and kernel"
|
||||
yum:
|
||||
name:
|
||||
- "{{ tfe_kmod }}"
|
||||
- "{{ dkms }}"
|
||||
- "{{ kernel_ml }}"
|
||||
- "{{ kernel_ml_devel }}"
|
||||
- "{{ elfutils_libelf_devel }}"
|
||||
- "{{ zlib_devel }}"
|
||||
state: absent
|
||||
when: uninstall.kernel == 1
|
||||
ignore_errors: true
|
||||
|
||||
####################
|
||||
#Uninstall Marsio
|
||||
- name: stop mrzcpd
|
||||
systemd:
|
||||
name: mrzcpd
|
||||
state: stopped
|
||||
enabled: no
|
||||
when:
|
||||
- backup.marsio == 1
|
||||
- uninstall.marsio == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: stop mrtunnat
|
||||
systemd:
|
||||
name: mrtunnat
|
||||
state: stopped
|
||||
enabled: no
|
||||
when:
|
||||
- backup.marsio == 1
|
||||
- uninstall.marsio == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: create backup_dest_path
|
||||
file:
|
||||
path: "{{ backup_dest_path }}"
|
||||
state: directory
|
||||
when: backup.marsio == 1
|
||||
|
||||
- name: backup /opt/mrzcpd to destination path
|
||||
archive:
|
||||
path: /opt/mrzcpd
|
||||
dest: "{{ backup_dest_path }}/mrzcpd_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when: backup.marsio == 1
|
||||
|
||||
- name: uninstall mrzcpd
|
||||
yum:
|
||||
name:
|
||||
- "{{ mrzcpd }}"
|
||||
state: absent
|
||||
when: uninstall.marsio == 1
|
||||
|
||||
- name: remove marsio files
|
||||
file:
|
||||
path: /opt/mrzcpd
|
||||
state: absent
|
||||
when: remove.marsio == 1
|
||||
|
||||
- name: remove mrzcpd.service
|
||||
file:
|
||||
path: /usr/lib/systemd/system/mrzcpd.service
|
||||
state: absent
|
||||
when: remove.marsio == 1
|
||||
|
||||
- name: remove mrtunnat.service
|
||||
file:
|
||||
path: /usr/lib/systemd/system/mrtunnat.service
|
||||
state: absent
|
||||
when: remove.marsio == 1
|
||||
|
||||
####################
|
||||
#Uninstall kni
|
||||
- name: stop sapp
|
||||
systemd:
|
||||
name: sapp
|
||||
state: stopped
|
||||
enabled: no
|
||||
when:
|
||||
- backup.kni == 1
|
||||
- uninstall.kni == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: create backup_dest_path
|
||||
file:
|
||||
path: "{{ backup_dest_path }}"
|
||||
state: directory
|
||||
when: backup.kni == 1
|
||||
|
||||
- name: backup sapp_run/etc/kni/ to destination path
|
||||
archive:
|
||||
path: /home/mesasoft/sapp_run/etc/kni
|
||||
dest: "{{ backup_dest_path }}/kni_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when: backup.kni == 1
|
||||
|
||||
- name: backup sapp_run/plug to destination path
|
||||
archive:
|
||||
path: /home/mesasoft/sapp_run/plug
|
||||
dest: "{{ backup_dest_path }}/sapp_plug_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when: backup.sapp_plug == 1
|
||||
|
||||
- name: "judge plug.zip"
|
||||
shell: "ls {{ backup_dest_path }}/sapp_plug_{{ uninstall_version }}_{{ date }}.zip"
|
||||
register: return
|
||||
ignore_errors: true
|
||||
|
||||
- name: uninstall kni
|
||||
yum:
|
||||
name:
|
||||
- "{{ kni }}"
|
||||
state: absent
|
||||
when: uninstall.kni == 1
|
||||
|
||||
- name: remove kni files
|
||||
file:
|
||||
path: /home/mesasoft/sapp_run/etc/kni/
|
||||
state: absent
|
||||
when: remove.kni == 1
|
||||
|
||||
####################
|
||||
#Uninstall tsg_master
|
||||
- name: stop sapp
|
||||
systemd:
|
||||
name: sapp
|
||||
state: stopped
|
||||
enabled: no
|
||||
when:
|
||||
- backup.sapp_tsgconf == 1
|
||||
- uninstall.tsgmaster == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: create backup_dest_path
|
||||
file:
|
||||
path: "{{ backup_dest_path }}"
|
||||
state: directory
|
||||
when: backup.sapp_tsgconf == 1
|
||||
|
||||
- name: backup sapp_run/tsgconf/ to destination path
|
||||
archive:
|
||||
path: /home/mesasoft/sapp_run/tsgconf
|
||||
dest: "{{ backup_dest_path }}/tsgconf_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when: backup.sapp_tsgconf == 1
|
||||
|
||||
- name: backup sapp_run/plug to destination path
|
||||
archive:
|
||||
path: /home/mesasoft/sapp_run/plug
|
||||
dest: "{{ backup_dest_path }}/sapp_plug_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when:
|
||||
- backup.sapp_plug == 1
|
||||
- return.rc != 0
|
||||
|
||||
- name: uninstall tsg_master
|
||||
yum:
|
||||
name:
|
||||
- "{{ tsg_master }}"
|
||||
state: absent
|
||||
when: uninstall.tsgmaster == 1
|
||||
|
||||
####################
|
||||
#Uninstall firewall
|
||||
- name: stop sapp
|
||||
systemd:
|
||||
name: sapp
|
||||
state: stopped
|
||||
enabled: no
|
||||
when:
|
||||
- backup.sapp_conf == 1
|
||||
- uninstall.firewall == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: create backup_dest_path
|
||||
file:
|
||||
path: "{{ backup_dest_path }}"
|
||||
state: directory
|
||||
when: backup.sapp_conf == 1
|
||||
|
||||
- name: create /home/mesasoft/sapp_runetc/
|
||||
file:
|
||||
path: /home/mesasoft/sapp_runetc/
|
||||
state: directory
|
||||
when: backup.sapp_conf == 1
|
||||
|
||||
- name: create entrylist.conf
|
||||
file:
|
||||
path: /home/mesasoft/sapp_runetc/entrylist.conf
|
||||
state: touch
|
||||
when: backup.sapp_conf == 1
|
||||
|
||||
- name: backup sapp_run/conf/ to destination path
|
||||
archive:
|
||||
path: /home/mesasoft/sapp_run/conf
|
||||
dest: "{{ backup_dest_path }}/sapp_conf_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when: backup.sapp_conf == 1
|
||||
|
||||
- name: backup sapp_run/plug to destination path
|
||||
archive:
|
||||
path: /home/mesasoft/sapp_run/plug
|
||||
dest: "{{ backup_dest_path }}/sapp_plug_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when:
|
||||
- backup.sapp_plug == 1
|
||||
- return.rc != 0
|
||||
|
||||
- name: uninstall firewall
|
||||
yum:
|
||||
name:
|
||||
- "{{ capture_packet_plug }}"
|
||||
- "{{ dns }}"
|
||||
- "{{ ftp }}"
|
||||
- "{{ http }}"
|
||||
- "{{ quic }}"
|
||||
- "{{ ssl }}"
|
||||
- "{{ mail }}"
|
||||
- "{{ fw_dns }}"
|
||||
- "{{ fw_ftp }}"
|
||||
- "{{ fw_http }}"
|
||||
- "{{ fw_ssl }}"
|
||||
- "{{ fw_mail }}"
|
||||
- "{{ tsg_conn_record }}"
|
||||
state: absent
|
||||
when: uninstall.firewall == 1
|
||||
|
||||
- name: uninstall firewall
|
||||
yum:
|
||||
name:
|
||||
- "{{ fw_quic }}"
|
||||
- "{{ tsg_conn_sketch }}"
|
||||
state: absent
|
||||
when: uninstall.firewall == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: remove /home/mesasoft/sapp_runetc
|
||||
file:
|
||||
path: /home/mesasoft/sapp_runetc
|
||||
state: absent
|
||||
when: uninstall.firewall == 1
|
||||
|
||||
####################
|
||||
#Uninstall sapp
|
||||
- name: stop sapp
|
||||
systemd:
|
||||
name: sapp
|
||||
state: stopped
|
||||
enabled: no
|
||||
when:
|
||||
- backup.sapp_etc == 1
|
||||
- uninstall.sapp == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: create backup_dest_path
|
||||
file:
|
||||
path: "{{ backup_dest_path }}"
|
||||
state: directory
|
||||
when: backup.sapp_etc == 1
|
||||
|
||||
- name: backup sapp_run/etc to destination path
|
||||
archive:
|
||||
path: /home/mesasoft/sapp_run/etc
|
||||
dest: "{{ backup_dest_path }}/sapp_etc_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when: backup.sapp_etc == 1
|
||||
|
||||
- name: uninstall sapp
|
||||
yum:
|
||||
name:
|
||||
- "{{ sapp }}"
|
||||
state: absent
|
||||
when: uninstall.sapp == 1
|
||||
|
||||
#- name: remove /home/mesasoft/sapp_run
|
||||
# file:
|
||||
# path: /home/mesasoft/sapp_run
|
||||
# state: absent
|
||||
# when:
|
||||
# - remove.sapp == 1
|
||||
# - backup.sapp_plug == 1
|
||||
# - backup.sapp_tsgconf == 1
|
||||
# - backup.sapp_etc == 1
|
||||
# - backup.sapp_conf == 1
|
||||
|
||||
- name: remove sapp.service
|
||||
file:
|
||||
path: /usr/lib/systemd/system/sapp.service
|
||||
state: absent
|
||||
when: remove.sapp == 1
|
||||
|
||||
####################
|
||||
#Uninstall tfe
|
||||
- name: stop tfe
|
||||
systemd:
|
||||
name: tfe
|
||||
state: stopped
|
||||
enabled: no
|
||||
when:
|
||||
- backup.tfe == 1
|
||||
- uninstall.tfe == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: stop tfe-env
|
||||
systemd:
|
||||
name: tfe-env
|
||||
state: stopped
|
||||
enabled: no
|
||||
when:
|
||||
- backup.tfe == 1
|
||||
- uninstall.tfe == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: create backup_dest_path
|
||||
file:
|
||||
path: "{{ backup_dest_path }}"
|
||||
state: directory
|
||||
when: backup.tfe == 1
|
||||
|
||||
- name: backup /opt/tsg/tfe/conf to destination path
|
||||
archive:
|
||||
path: /opt/tsg/tfe/conf
|
||||
dest: "{{ backup_dest_path }}/tfe_conf_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when: backup.tfe == 1
|
||||
|
||||
- name: uninstall tfe
|
||||
yum:
|
||||
name:
|
||||
- "{{ tfe }}"
|
||||
state: absent
|
||||
when: uninstall.tfe == 1
|
||||
|
||||
- name: remove /opt/tsg/tfe
|
||||
file:
|
||||
path: /opt/tsg/tfe
|
||||
state: absent
|
||||
when: remove.tfe == 1
|
||||
|
||||
- name: remove tfe.service
|
||||
file:
|
||||
path: /usr/lib/systemd/system/tfe.service
|
||||
state: absent
|
||||
when: remove.tfe == 1
|
||||
|
||||
- name: remove tfe-env.service
|
||||
file:
|
||||
path: /usr/lib/systemd/system/tfe-env.service
|
||||
state: absent
|
||||
when: remove.tfe == 1
|
||||
|
||||
- name: remove tfe-env-tun-mode.service
|
||||
file:
|
||||
path: /usr/lib/systemd/system/tfe-env-tun-mode.service
|
||||
state: absent
|
||||
when: remove.tfe == 1
|
||||
|
||||
####################
|
||||
#Uninstall Certstore
|
||||
- name: stop certstore
|
||||
systemd:
|
||||
name: certstore
|
||||
state: stopped
|
||||
enabled: no
|
||||
when:
|
||||
- backup.certstore == 1
|
||||
- uninstall.certstore == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: create backup_dest_path
|
||||
file:
|
||||
path: "{{ backup_dest_path }}"
|
||||
state: directory
|
||||
when: backup.certstore == 1
|
||||
|
||||
- name: backup /home/tsg/certstore to destination path
|
||||
archive:
|
||||
path: /home/tsg/certstore
|
||||
dest: "{{ backup_dest_path }}/certstore_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when: backup.certstore == 1
|
||||
|
||||
- name: uninstall certstore
|
||||
yum:
|
||||
name:
|
||||
- "{{ certstore }}"
|
||||
state: absent
|
||||
when: uninstall.certstore == 1
|
||||
|
||||
- name: remove certstore files
|
||||
file:
|
||||
path: /home/tsg/certstore
|
||||
state: absent
|
||||
when: remove.certstore == 1
|
||||
|
||||
- name: remove certstore.service
|
||||
file:
|
||||
path: /usr/lib/systemd/system/certstore.service
|
||||
state: absent
|
||||
when: remove.certstore == 1
|
||||
|
||||
####################
|
||||
#Uninstall cert-redis
|
||||
- name: stop cert-redis
|
||||
systemd:
|
||||
name: cert-redis
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: uninstall.certredis == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: remove cert-redis files
|
||||
file:
|
||||
path: /home/tsg/cert-redis
|
||||
state: absent
|
||||
when: remove.certredis == 1
|
||||
|
||||
####################
|
||||
#Uninstall clotho
|
||||
- name: stop clotho
|
||||
systemd:
|
||||
name: clotho
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: uninstall.clotho == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: uninstall clotho
|
||||
yum:
|
||||
name:
|
||||
- "{{ clotho }}"
|
||||
state: absent
|
||||
when: uninstall.clotho == 1
|
||||
|
||||
- name: remove clotho files
|
||||
file:
|
||||
path: /home/mesasoft/clotho
|
||||
state: absent
|
||||
when: remove.clotho == 1
|
||||
|
||||
- name: remove clotho.service
|
||||
file:
|
||||
path: /usr/lib/systemd/system/clotho.service
|
||||
state: absent
|
||||
when: remove.clotho == 1
|
||||
|
||||
####################
|
||||
#Uninstall http_healthcheck
|
||||
- name: uninstall http_healthcheck
|
||||
yum:
|
||||
name:
|
||||
- "{{ http_healthcheck }}"
|
||||
state: absent
|
||||
when: uninstall.http_healthcheck == 1
|
||||
|
||||
- name: remove http_healthcheck files
|
||||
file:
|
||||
path: /home/mesasoft/http_healthcheck
|
||||
state: absent
|
||||
when: remove.http_healthcheck == 1
|
||||
|
||||
####################
|
||||
#Uninstall framework
|
||||
- name: create backup_dest_path
|
||||
file:
|
||||
path: "{{ backup_dest_path }}"
|
||||
state: directory
|
||||
when: backup.framework == 1
|
||||
|
||||
- name: backup /home/tsg/certstore to destination path
|
||||
archive:
|
||||
path: /opt/MESA
|
||||
dest: "{{ backup_dest_path }}/opt_MESA_{{ uninstall_version }}_{{ date }}.zip"
|
||||
format: zip
|
||||
when: backup.framework == 1
|
||||
|
||||
- name: uninstall framework
|
||||
yum:
|
||||
name:
|
||||
- "{{ libcjson }}"
|
||||
- "{{ libdocument }}"
|
||||
- "{{ libmaatframe }}"
|
||||
- "{{ libMESA_field_stat }}"
|
||||
- "{{ libMESA_field_stat2 }}"
|
||||
- "{{ libMESA_handle_logger }}"
|
||||
- "{{ libMESA_htable }}"
|
||||
- "{{ libMESA_prof_load }}"
|
||||
- "{{ librdkafka }}"
|
||||
- "{{ librulescan }}"
|
||||
- "{{ libwiredcfg }}"
|
||||
- "{{ libWiredLB }}"
|
||||
- "{{ lz4 }}"
|
||||
state: absent
|
||||
when: uninstall.framework == 1
|
||||
|
||||
- name: remove framework files
|
||||
file:
|
||||
path: /opt/MESA
|
||||
state: absent
|
||||
when: remove.framework == 1
|
||||
|
||||
####################
|
||||
#Uninstall telegraf_statistic
|
||||
- name: stop telegraf_statistic
|
||||
systemd:
|
||||
name: telegraf_statistic
|
||||
state: stopped
|
||||
enabled: no
|
||||
when: uninstall.telegraf_statistic == 1
|
||||
ignore_errors: true
|
||||
|
||||
- name: uninstall telegraf_statistic
|
||||
yum:
|
||||
name:
|
||||
- "{{ telegraf_statistic }}"
|
||||
state: absent
|
||||
when: uninstall.telegraf_statistic == 1
|
||||
|
||||
- name: remove telegraf_statistic files
|
||||
file:
|
||||
path: /etc/telegraf/telegraf_statistic.conf
|
||||
state: absent
|
||||
when: remove.telegraf_statistic == 1
|
||||
|
||||
- name: remove /tmp/metrics.out
|
||||
file:
|
||||
path: /tmp/metrics.out
|
||||
state: absent
|
||||
when: remove.telegraf_statistic == 1
|
||||
|
||||
####################
|
||||
#Remove other tsg files
|
||||
- name: remove /home/mesasoft
|
||||
file:
|
||||
path: /home/mesasoft
|
||||
state: absent
|
||||
when:
|
||||
- remove.kni == 1
|
||||
- remove.sapp == 1
|
||||
- remove.clotho == 1
|
||||
|
||||
- name: remove /home/tsg
|
||||
file:
|
||||
path: /home/tsg
|
||||
state: absent
|
||||
when:
|
||||
- remove.certstore == 1
|
||||
- remove.certredis == 1
|
||||
|
||||
- name: remove /opt/proxy_status
|
||||
file:
|
||||
path: /opt/proxy_status
|
||||
state: absent
|
||||
|
||||
- name: remove /tmp/ansible_deploy
|
||||
file:
|
||||
path: /tmp/ansible_deploy
|
||||
state: absent
|
||||
52
uninstall/uninstall_config/group_vars/uninstall_vars.yml
Normal file
52
uninstall/uninstall_config/group_vars/uninstall_vars.yml
Normal file
@@ -0,0 +1,52 @@
|
||||
####################
|
||||
#Uninstall the target TSG version
|
||||
#Support 20.08 / 20.07 / 20.07.rc1 / 20.06.1
|
||||
uninstall_version: 20.08
|
||||
|
||||
####################
|
||||
#Backup
|
||||
backup_dest_path: /root/backup_data
|
||||
date: 20200914
|
||||
backup:
|
||||
marsio: 1
|
||||
tfe: 1
|
||||
sapp_plug: 1
|
||||
sapp_tsgconf: 1
|
||||
sapp_conf: 1
|
||||
sapp_etc: 1
|
||||
kni: 1
|
||||
certstore: 1
|
||||
framework: 1
|
||||
|
||||
####################
|
||||
#Uninstall list
|
||||
uninstall:
|
||||
kernel: 0
|
||||
framework: 1
|
||||
marsio: 1
|
||||
sapp: 1
|
||||
tsgmaster: 1
|
||||
firewall: 1
|
||||
kni: 1
|
||||
tfe: 1
|
||||
certstore: 1
|
||||
certredis: 1
|
||||
clotho: 1
|
||||
http_healthcheck: 1
|
||||
telegraf_statistic: 1
|
||||
tsg_env_tun_mode: 0
|
||||
|
||||
####################
|
||||
#Remove list
|
||||
remove:
|
||||
marsio: 1
|
||||
kni: 1
|
||||
certstore: 1
|
||||
sapp: 1
|
||||
tfe: 1
|
||||
certredis: 1
|
||||
clotho: 1
|
||||
http_healthcheck: 1
|
||||
framework: 1
|
||||
telegraf_statistic: 1
|
||||
|
||||
17
uninstall/uninstall_config/hosts
Normal file
17
uninstall/uninstall_config/hosts
Normal file
@@ -0,0 +1,17 @@
|
||||
####################
|
||||
# For example #
|
||||
####################
|
||||
#
|
||||
#[uninstall_server]
|
||||
#1.1.1.1
|
||||
#
|
||||
#[uninstall_adc_mcn0]
|
||||
#10.3.72.1
|
||||
#
|
||||
#[uninstall_adc_mcn123]
|
||||
#10.3.73.1
|
||||
#10.3.74.1
|
||||
#10.3.75.1
|
||||
[uninstall_server]
|
||||
[uninstall_adc_mcn0]
|
||||
[uninstall_adc_mcn123]
|
||||
23
uninstall/uninstall_tsg.yml
Normal file
23
uninstall/uninstall_tsg.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
- hosts: uninstall_server
|
||||
remote_user: root
|
||||
roles:
|
||||
- uninstall_server
|
||||
vars_files:
|
||||
- uninstall_config/group_vars/uninstall_vars.yml
|
||||
- roles/package_list/20.08.yml
|
||||
|
||||
- hosts: uninstall_adc_mcn0
|
||||
remote_user: root
|
||||
roles:
|
||||
- uninstall_adc_mcn0
|
||||
vars_files:
|
||||
- uninstall_config/group_vars/uninstall_vars.yml
|
||||
- roles/package_list/20.08.yml
|
||||
|
||||
- hosts: uninstall_adc_mcn123
|
||||
remote_user: root
|
||||
roles:
|
||||
- uninstall_adc_mcn123
|
||||
vars_files:
|
||||
- uninstall_config/group_vars/uninstall_vars.yml
|
||||
- roles/package_list/20.08.yml
|
||||
Reference in New Issue
Block a user