diff options
| author | zhangzhihan <[email protected]> | 2020-09-21 18:33:10 +0800 |
|---|---|---|
| committer | zhangzhihan <[email protected]> | 2020-09-21 18:33:10 +0800 |
| commit | 05b56cb4ec1aa29f036b2cc3eba3b6adf9c676ee (patch) | |
| tree | a4ccd574a226acddeba92ad6e26ef15fdb01b5a6 /uninstall/roles | |
| parent | 27d3231a6e1a5132a46d8f5920e9acd81d325b0d (diff) | |
update
Diffstat (limited to 'uninstall/roles')
15 files changed, 566 insertions, 176 deletions
diff --git a/uninstall/roles/package_list/20.09.yml b/uninstall/roles/package_list/20.09.yml new file mode 100644 index 0000000..8c275c1 --- /dev/null +++ b/uninstall/roles/package_list/20.09.yml @@ -0,0 +1,93 @@ +#################### +#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.7.34de556-1.x86_64 +libMESA_field_stat: libMESA_field_stat-1.0.1.852c2df-1.x86_64 +libMESA_field_stat2: libMESA_field_stat2-2.9.1.d80b5fb-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 +libtsglua: libtsglua-1.0.7.0864e4a-1.x86_64 + +#################### +#sapp +sapp: sapp-4.1.7.4f2839a-1.x86_64 + +#################### +#tsg_master +tsg_master: tsg_master-3.2.8.e57ad7f-1.x86_64 + +#################### +#kni +kni: kni-20.09-1.el7.x86_64 + +#################### +#firewall +capture_packet_plug: capture_packet_plug-3.0.2.09f193c-1.x86_64 +dns: dns-2.0.8.beb1d09-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.9.810857d-1.x86_64 +ssl: ssl-1.0.8.0068bd9-1.x86_64 +mail: mail-1.0.7.9e3be05-1.x86_64 +fw_dns: fw_dns_plug-3.0.1.453c533-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 + +#################### +#Tsg_app +app_sketch_local: app_sketch_local-1.0.2.fd63c68-1.x86_64 +app_control_plug: app_control_plug-1.0.2.a724506-1.x86_64 +app_master: app_master-1.0.4.d189dee-1.x86_64 + +#################### +#tfe +tfe: tfe-4.3.10.fb02543-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.202009.87fcacf-1.el7.x86_64 + +##################### +#telegraf +telegraf_statistic: telegraf-1.13.0-1.x86_64 + +##################### +#tsg-diagnose +tsg-diagnose: tsg-diagnose-20.09-1.el7.x86_64 diff --git a/uninstall/roles/uninstall_adc_mcn0/tasks/certredis_after_20.09.yml b/uninstall/roles/uninstall_adc_mcn0/tasks/certredis_after_20.09.yml new file mode 100644 index 0000000..49d6e27 --- /dev/null +++ b/uninstall/roles/uninstall_adc_mcn0/tasks/certredis_after_20.09.yml @@ -0,0 +1,13 @@ +- 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: /opt/tsg/cert-redis + state: absent + when: remove.certredis == 1 diff --git a/uninstall/roles/uninstall_adc_mcn0/tasks/certredis_before_20.09.yml b/uninstall/roles/uninstall_adc_mcn0/tasks/certredis_before_20.09.yml new file mode 100644 index 0000000..a63754b --- /dev/null +++ b/uninstall/roles/uninstall_adc_mcn0/tasks/certredis_before_20.09.yml @@ -0,0 +1,13 @@ +- 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 diff --git a/uninstall/roles/uninstall_adc_mcn0/tasks/certstore_after_20.09.yml b/uninstall/roles/uninstall_adc_mcn0/tasks/certstore_after_20.09.yml new file mode 100644 index 0000000..42f00c4 --- /dev/null +++ b/uninstall/roles/uninstall_adc_mcn0/tasks/certstore_after_20.09.yml @@ -0,0 +1,42 @@ +- 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 /opt/tsg/certstore to destination path + archive: + path: /opt/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: /opt/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 + diff --git a/uninstall/roles/uninstall_adc_mcn0/tasks/certstore_before_20.09.yml b/uninstall/roles/uninstall_adc_mcn0/tasks/certstore_before_20.09.yml new file mode 100644 index 0000000..b874377 --- /dev/null +++ b/uninstall/roles/uninstall_adc_mcn0/tasks/certstore_before_20.09.yml @@ -0,0 +1,42 @@ +- 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 + diff --git a/uninstall/roles/uninstall_adc_mcn0/tasks/framework_after_20.09.yml b/uninstall/roles/uninstall_adc_mcn0/tasks/framework_after_20.09.yml new file mode 100644 index 0000000..064e64b --- /dev/null +++ b/uninstall/roles/uninstall_adc_mcn0/tasks/framework_after_20.09.yml @@ -0,0 +1,38 @@ +- 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 }}" + - "{{ libtsglua }}" + state: absent + when: uninstall.framework == 1 + +- name: remove framework files + file: + path: /opt/MESA + state: absent + when: remove.framework == 1 diff --git a/uninstall/roles/uninstall_adc_mcn0/tasks/framework_before_20.09.yml b/uninstall/roles/uninstall_adc_mcn0/tasks/framework_before_20.09.yml new file mode 100644 index 0000000..4cd6777 --- /dev/null +++ b/uninstall/roles/uninstall_adc_mcn0/tasks/framework_before_20.09.yml @@ -0,0 +1,37 @@ +- 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 diff --git a/uninstall/roles/uninstall_adc_mcn0/tasks/main.yml b/uninstall/roles/uninstall_adc_mcn0/tasks/main.yml index 6417634..2bfd22b 100644 --- a/uninstall/roles/uninstall_adc_mcn0/tasks/main.yml +++ b/uninstall/roles/uninstall_adc_mcn0/tasks/main.yml @@ -132,6 +132,29 @@ when: remove.kni == 1 #################### +#Tsg-app +- name: stop sapp + systemd: + name: sapp + state: stopped + enabled: no + when: + - uninstall_version >= 20.09 + - uninstall.tsg_app == 1 + ignore_errors: true + +- name: uninstall tsg_app + yum: + name: + - "{{ app_sketch_local }}" + - "{{ app_control_plug }}" + - "{{ app_master }}" + state: absent + when: + - uninstall_version >= 20.09 + - uninstall.tsg_app == 1 + +#################### #Uninstall tsg_master - name: stop sapp systemd: @@ -303,63 +326,24 @@ #################### #Uninstall Certstore -- name: stop certstore - systemd: - name: certstore - state: stopped - enabled: no - when: - - backup.certstore == 1 - - uninstall.certstore == 1 - ignore_errors: true +- name: uninstall certstore before 20.09 + include: certstore_before_20.09.yml + when: uninstall_version < 20.09 -- 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 +- name: uninstall certstore after 20.09 + include: certstore_after_20.09.yml + when: uninstall_version >= 20.09 #################### #Uninstall cert-redis -- name: stop cert-redis - systemd: - name: cert-redis - state: stopped - enabled: no - when: uninstall.certredis == 1 - ignore_errors: true +- name: uninstall certredis before 20.09 + include: certredis_before_20.09.yml + when: uninstall_version < 20.09 + +- name: uninstall certredis after 20.09 + include: certredis_after_20.09.yml + when: uninstall_version >= 20.09 -- name: remove cert-redis files - file: - path: /home/tsg/cert-redis - state: absent - when: remove.certredis == 1 #################### #Uninstall clotho @@ -407,43 +391,13 @@ #################### #Uninstall framework -- name: create backup_dest_path - file: - path: "{{ backup_dest_path }}" - state: directory - when: backup.framework == 1 +- name: uninstall framework before 20.09 + include: framework_before_20.09.yml + when: uninstall_version < 20.09 -- 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 +- name: uninstall framework after 20.09 + include: framework_after_20.09.yml + when: uninstall_version >= 20.09 #################### #Uninstall telegraf_statistic @@ -475,6 +429,27 @@ when: remove.telegraf_statistic == 1 #################### +#Tsg-diagnose +- name: stop docker + systemd: + name: docker + state: stopped + enabled: no + when: + - uninstall.tsg_diagnose == 1 + - uninstall_version >= 20.09 + ignore_errors: true + +- name: uninstall tsg_diagnose + yum: + name: + - "{{ tsg_diagnose }}" + state: absent + when: + - uninstall.tsg_diagnose == 1 + - uninstall_version >= 20.09 + +#################### #Remove other tsg files - name: remove /home/mesasoft file: diff --git a/uninstall/roles/uninstall_server/tasks/certredis_after_20.09.yml b/uninstall/roles/uninstall_server/tasks/certredis_after_20.09.yml new file mode 100644 index 0000000..49d6e27 --- /dev/null +++ b/uninstall/roles/uninstall_server/tasks/certredis_after_20.09.yml @@ -0,0 +1,13 @@ +- 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: /opt/tsg/cert-redis + state: absent + when: remove.certredis == 1 diff --git a/uninstall/roles/uninstall_server/tasks/certredis_before_20.09.yml b/uninstall/roles/uninstall_server/tasks/certredis_before_20.09.yml new file mode 100644 index 0000000..a63754b --- /dev/null +++ b/uninstall/roles/uninstall_server/tasks/certredis_before_20.09.yml @@ -0,0 +1,13 @@ +- 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 diff --git a/uninstall/roles/uninstall_server/tasks/certstore_after_20.09.yml b/uninstall/roles/uninstall_server/tasks/certstore_after_20.09.yml new file mode 100644 index 0000000..42f00c4 --- /dev/null +++ b/uninstall/roles/uninstall_server/tasks/certstore_after_20.09.yml @@ -0,0 +1,42 @@ +- 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 /opt/tsg/certstore to destination path + archive: + path: /opt/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: /opt/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 + diff --git a/uninstall/roles/uninstall_server/tasks/certstore_before_20.09.yml b/uninstall/roles/uninstall_server/tasks/certstore_before_20.09.yml new file mode 100644 index 0000000..b874377 --- /dev/null +++ b/uninstall/roles/uninstall_server/tasks/certstore_before_20.09.yml @@ -0,0 +1,42 @@ +- 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 + diff --git a/uninstall/roles/uninstall_server/tasks/framework_after_20.09.yml b/uninstall/roles/uninstall_server/tasks/framework_after_20.09.yml new file mode 100644 index 0000000..064e64b --- /dev/null +++ b/uninstall/roles/uninstall_server/tasks/framework_after_20.09.yml @@ -0,0 +1,38 @@ +- 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 }}" + - "{{ libtsglua }}" + state: absent + when: uninstall.framework == 1 + +- name: remove framework files + file: + path: /opt/MESA + state: absent + when: remove.framework == 1 diff --git a/uninstall/roles/uninstall_server/tasks/framework_before_20.09.yml b/uninstall/roles/uninstall_server/tasks/framework_before_20.09.yml new file mode 100644 index 0000000..ba9b710 --- /dev/null +++ b/uninstall/roles/uninstall_server/tasks/framework_before_20.09.yml @@ -0,0 +1,37 @@ +- name: create backup_dest_path + file: + path: "{{ backup_dest_path }}" + state: directory + when: backup.framework == 1 + +- name: backup /opt/MESA 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 diff --git a/uninstall/roles/uninstall_server/tasks/main.yml b/uninstall/roles/uninstall_server/tasks/main.yml index 9579f84..91c7c7e 100644 --- a/uninstall/roles/uninstall_server/tasks/main.yml +++ b/uninstall/roles/uninstall_server/tasks/main.yml @@ -130,6 +130,28 @@ path: /home/mesasoft/sapp_run/etc/kni/ state: absent when: remove.kni == 1 +#################### +#Tsg-app +- name: stop sapp + systemd: + name: sapp + state: stopped + enabled: no + when: + - uninstall_version >= 20.09 + - uninstall.tsg_app == 1 + ignore_errors: true + +- name: uninstall tsg_app + yum: + name: + - "{{ app_sketch_local }}" + - "{{ app_control_plug }}" + - "{{ app_master }}" + state: absent + when: + - uninstall_version >= 20.09 + - uninstall.tsg_app == 1 #################### #Uninstall tsg_master @@ -369,63 +391,23 @@ #################### #Uninstall Certstore -- name: stop certstore - systemd: - name: certstore - state: stopped - enabled: no - when: - - backup.certstore == 1 - - uninstall.certstore == 1 - ignore_errors: true +- name: uninstall certstore before 20.09 + include: certstore_before_20.09.yml + when: uninstall_version < 20.09 -- 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 +- name: uninstall certstore after 20.09 + include: certstore_after_20.09.yml + when: uninstall_version >= 20.09 #################### #Uninstall cert-redis -- name: stop cert-redis - systemd: - name: cert-redis - state: stopped - enabled: no - when: uninstall.certredis == 1 - ignore_errors: true +- name: uninstall certredis before 20.09 + include: certredis_before_20.09.yml + when: uninstall_version < 20.09 -- name: remove cert-redis files - file: - path: /home/tsg/cert-redis - state: absent - when: remove.certredis == 1 +- name: uninstall certredis after 20.09 + include: certredis_after_20.09.yml + when: uninstall_version >= 20.09 #################### #Uninstall clotho @@ -473,43 +455,13 @@ #################### #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 before 20.09 + include: framework_before_20.09.yml + when: uninstall_version < 20.09 -- 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 +- name: uninstall framework after 20.09 + include: framework_after_20.09.yml + when: uninstall_version >= 20.09 #################### #Uninstall telegraf_statistic |
