summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhangzhihan <[email protected]>2020-09-25 12:12:25 +0800
committerzhangzhihan <[email protected]>2020-09-25 12:12:25 +0800
commitb57e742be88edfbe5e4ab986b8b2916499aac080 (patch)
treefc2ea0d9fb126eb9991e530b61b07160d30cf0db
parent4177c779ef93979e850c6676ac50192ae0975357 (diff)
update
-rw-r--r--roles/kni/templates/kni.conf.j252
-rw-r--r--roles/tfe/templates/tfe.conf.j26
-rw-r--r--uninstall/roles/backup_framework_config/tasks/main.yml14
-rw-r--r--uninstall/roles/backup_marsio_config/tasks/main.yml13
-rw-r--r--uninstall/roles/backup_sapp_config/tasks/main.yml47
-rw-r--r--uninstall/roles/backup_tfe_config/tasks/main.yml21
-rw-r--r--uninstall/roles/backup_tsgenv_config/tasks/main.yml13
-rw-r--r--uninstall/roles/cert_redis/tasks/main.yml7
-rw-r--r--uninstall/roles/certstore/tasks/main.yml16
-rw-r--r--uninstall/roles/clotho/tasks/main.yml16
-rw-r--r--uninstall/roles/firewall/tasks/main.yml45
-rw-r--r--uninstall/roles/framework/tasks/main.yml (renamed from uninstall/roles/uninstall_adc_mcn0/tasks/framework_after_20.09.yml)26
-rw-r--r--uninstall/roles/http_healthcheck/tasks/main.yml9
-rw-r--r--uninstall/roles/kernel/tasks/main.yml23
-rw-r--r--uninstall/roles/kni/tasks/main.yml18
-rw-r--r--uninstall/roles/marsio/tasks/main.yml26
-rw-r--r--uninstall/roles/remove_files/tasks/main.yml90
-rw-r--r--uninstall/roles/remove_framework_files/tasks/main.yml6
-rw-r--r--uninstall/roles/remove_marsio_files/tasks/main.yml21
-rw-r--r--uninstall/roles/remove_tfe_files/tasks/main.yml28
-rw-r--r--uninstall/roles/sapp/tasks/main.yml17
-rw-r--r--uninstall/roles/telegraf_statistic/tasks/main.yml10
-rw-r--r--uninstall/roles/tfe/tasks/main.yml26
-rw-r--r--uninstall/roles/tsg_app/tasks/main.yml24
-rw-r--r--uninstall/roles/tsg_master/tasks/main.yml18
-rw-r--r--uninstall/roles/uninstall_adc_mcn0/tasks/certredis_after_20.09.yml13
-rw-r--r--uninstall/roles/uninstall_adc_mcn0/tasks/certredis_before_20.09.yml13
-rw-r--r--uninstall/roles/uninstall_adc_mcn0/tasks/certstore_after_20.09.yml42
-rw-r--r--uninstall/roles/uninstall_adc_mcn0/tasks/certstore_before_20.09.yml42
-rw-r--r--uninstall/roles/uninstall_adc_mcn0/tasks/framework_before_20.09.yml37
-rw-r--r--uninstall/roles/uninstall_adc_mcn0/tasks/main.yml480
-rw-r--r--uninstall/roles/uninstall_adc_mcn123/tasks/main.yml189
-rw-r--r--uninstall/roles/uninstall_server/tasks/certredis_after_20.09.yml13
-rw-r--r--uninstall/roles/uninstall_server/tasks/certredis_before_20.09.yml13
-rw-r--r--uninstall/roles/uninstall_server/tasks/certstore_after_20.09.yml42
-rw-r--r--uninstall/roles/uninstall_server/tasks/certstore_before_20.09.yml42
-rw-r--r--uninstall/roles/uninstall_server/tasks/framework_after_20.09.yml38
-rw-r--r--uninstall/roles/uninstall_server/tasks/framework_before_20.09.yml37
-rw-r--r--uninstall/roles/uninstall_server/tasks/main.yml523
-rw-r--r--uninstall/uninstall_config/group_vars/uninstall_vars.yml26
-rw-r--r--uninstall/uninstall_tsg.yml57
41 files changed, 638 insertions, 1561 deletions
diff --git a/roles/kni/templates/kni.conf.j2 b/roles/kni/templates/kni.conf.j2
index 034d319..844023c 100644
--- a/roles/kni/templates/kni.conf.j2
+++ b/roles/kni/templates/kni.conf.j2
@@ -81,3 +81,55 @@ remote_port = 8100
local_path = ./fs2_kni.status
stat_cycle = 1
print_mode = 1
+
+[ssl_dynamic_bypass]
+enabled = 1
+
+#kni dynamic bypass
+[traceid2sslinfo_htable]
+mho_screen_print_ctrl = 0
+mho_thread_safe = 1
+mho_mutex_num = 160
+mho_hash_slot_size = 80000
+mho_hash_max_element_num = 320000
+mho_expire_time = 300
+mho_eliminate_type = FIFO
+
+[sslinfo2bypass_htable]
+mho_screen_print_ctrl = 0
+mho_thread_safe = 1
+mho_mutex_num = 160
+mho_hash_slot_size = 640000
+mho_hash_max_element_num = 2560000
+mho_expire_time = 300
+mho_eliminate_type = FIFO
+
+[proxy_tcp_option]
+enabled = 1
+maat_table_compile = PXY_TCP_OPTION_COMPILE
+maat_table_addr = PXY_TCP_OPTION_ADDR
+maat_table_fqdn = PXY_TCP_OPTION_SERVER_FQDN
+enable_override = 0
+client_tcp_maxseg_enable = 0
+client_tcp_maxseg = 1460
+client_tcp_nodelay = 1
+client_tcp_ttl = 70
+client_tcp_keepalive_enable = 1
+client_tcp_keepalive_keepcnt = 8
+client_tcp_keepalive_keepidle = 30
+client_tcp_keepalive_keepintvl = 15
+client_tcp_user_timeout = 600
+server_tcp_maxseg_enable = 0
+server_tcp_maxseg = 1460
+server_tcp_nodelay = 1
+server_tcp_ttl = 75
+server_tcp_keepalive_enable = 1
+server_tcp_keepalive_keepcnt = 8
+server_tcp_keepalive_keepidle = 30
+server_tcp_keepalive_keepintvl = 15
+server_tcp_user_timeout = 600
+bypass_duplicated_packet = 0
+tcp_passthrough = 0
+
+[share_session_attribute]
+SESSION_ATTRIBUTE_LABEL=TSG_MASTER_INTERNAL_LABEL
diff --git a/roles/tfe/templates/tfe.conf.j2 b/roles/tfe/templates/tfe.conf.j2
index b0e2077..6766871 100644
--- a/roles/tfe/templates/tfe.conf.j2
+++ b/roles/tfe/templates/tfe.conf.j2
@@ -66,9 +66,15 @@ service_cache_fail_time_window=30
# cert
check_cert_crl=0
+{% if tsg_running_type == 2 %}
trusted_cert_load_local=1
#trusted_cert_file=resource/tfe/tls-ca-bundle.pem
trusted_cert_file=resource/tfe/tsg_diagnose_ca.pem
+{% else %}
+trusted_cert_load_local=0
+trusted_cert_file=resource/tfe/tls-ca-bundle.pem
+#trusted_cert_file=resource/tfe/tsg_diagnose_ca.pem
+{% endif %}
trusted_cert_dir=resource/tfe/trusted_storage
# master key
diff --git a/uninstall/roles/backup_framework_config/tasks/main.yml b/uninstall/roles/backup_framework_config/tasks/main.yml
new file mode 100644
index 0000000..c2d0aae
--- /dev/null
+++ b/uninstall/roles/backup_framework_config/tasks/main.yml
@@ -0,0 +1,14 @@
+- name: "create backup_dest_path"
+ file:
+ path: "{{ backup_dest_path }}"
+ state: directory
+ ignore_errors: true
+
+- name: "backup /opt/MESA to destination path"
+ archive:
+ path: /opt/MESA
+ dest: "{{ backup_dest_path }}/optMESA_{{ uninstall_version }}_{{ date }}.zip"
+ format: zip
+ when: backup.framework == 1
+ ignore_errors: true
+
diff --git a/uninstall/roles/backup_marsio_config/tasks/main.yml b/uninstall/roles/backup_marsio_config/tasks/main.yml
new file mode 100644
index 0000000..fb69093
--- /dev/null
+++ b/uninstall/roles/backup_marsio_config/tasks/main.yml
@@ -0,0 +1,13 @@
+- name: "create backup_dest_path"
+ file:
+ path: "{{ backup_dest_path }}"
+ state: directory
+ ignore_errors: true
+
+- 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
+ ignore_errors: true
diff --git a/uninstall/roles/backup_sapp_config/tasks/main.yml b/uninstall/roles/backup_sapp_config/tasks/main.yml
new file mode 100644
index 0000000..03cf82d
--- /dev/null
+++ b/uninstall/roles/backup_sapp_config/tasks/main.yml
@@ -0,0 +1,47 @@
+- name: "create backup_dest_path"
+ file:
+ path: "{{ backup_dest_path }}"
+ state: directory
+ ignore_errors: true
+
+- 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
+ ignore_errors: true
+
+- 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
+ ignore_errors: true
+
+- name: "backup sapp_run/tsgconf/ to destination path"
+ archive:
+ path: /home/mesasoft/sapp_run/tsgconf
+ dest: "{{ backup_dest_path }}/sapp_tsgconf_{{ uninstall_version }}_{{ date }}.zip"
+ format: zip
+ when: backup.sapp_tsgconf == 1
+ ignore_errors: true
+
+- name: "backup sapp_run/appconf/ to destination path"
+ archive:
+ path: /home/mesasoft/sapp_run/appconf
+ dest: "{{ backup_dest_path }}/sapp_appconf_{{ uninstall_version }}_{{ date }}.zip"
+ format: zip
+ when: backup.sapp_appconf == 1
+ ignore_errors: true
+
+- 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
+ ignore_errors: true
+
+
diff --git a/uninstall/roles/backup_tfe_config/tasks/main.yml b/uninstall/roles/backup_tfe_config/tasks/main.yml
new file mode 100644
index 0000000..2b528cf
--- /dev/null
+++ b/uninstall/roles/backup_tfe_config/tasks/main.yml
@@ -0,0 +1,21 @@
+- name: "create backup_dest_path"
+ file:
+ path: "{{ backup_dest_path }}"
+ state: directory
+ ignore_errors: true
+
+- 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
+ ignore_errors: true
+
+- name: "backup /opt/tsg/env to destination path"
+ archive:
+ path: /opt/tsg/env
+ dest: "{{ backup_dest_path }}/tsg_env_1_{{ uninstall_version }}_{{ date }}.zip"
+ format: zip
+ when: backup.tsg_env == 1
+ ignore_errors: true
diff --git a/uninstall/roles/backup_tsgenv_config/tasks/main.yml b/uninstall/roles/backup_tsgenv_config/tasks/main.yml
new file mode 100644
index 0000000..7c677ce
--- /dev/null
+++ b/uninstall/roles/backup_tsgenv_config/tasks/main.yml
@@ -0,0 +1,13 @@
+- name: "create backup_dest_path"
+ file:
+ path: "{{ backup_dest_path }}"
+ state: directory
+ ignore_errors: true
+
+- name: "backup /opt/tsg/env to destination path"
+ archive:
+ path: /opt/tsg/env
+ dest: "{{ backup_dest_path }}/tsg_env_{{ uninstall_version }}_{{ date }}.zip"
+ format: zip
+ when: backup.tsg_env == 1
+ ignore_errors: true
diff --git a/uninstall/roles/cert_redis/tasks/main.yml b/uninstall/roles/cert_redis/tasks/main.yml
new file mode 100644
index 0000000..d463140
--- /dev/null
+++ b/uninstall/roles/cert_redis/tasks/main.yml
@@ -0,0 +1,7 @@
+- name: "[uninstall cert_redis] stop cert-redis"
+ systemd:
+ name: cert-redis
+ state: stopped
+ enabled: no
+ when: uninstall.certredis == 1
+ ignore_errors: true
diff --git a/uninstall/roles/certstore/tasks/main.yml b/uninstall/roles/certstore/tasks/main.yml
new file mode 100644
index 0000000..006cb80
--- /dev/null
+++ b/uninstall/roles/certstore/tasks/main.yml
@@ -0,0 +1,16 @@
+- name: "[uninstall certstore] stop certstore"
+ systemd:
+ name: certstore
+ state: stopped
+ enabled: no
+ when:
+ - uninstall.certstore == 1
+ ignore_errors: true
+
+- name: "[uninstall certstore] uninstall certstore"
+ yum:
+ name:
+ - "{{ certstore }}"
+ state: absent
+ when: uninstall.certstore == 1
+
diff --git a/uninstall/roles/clotho/tasks/main.yml b/uninstall/roles/clotho/tasks/main.yml
new file mode 100644
index 0000000..9c19251
--- /dev/null
+++ b/uninstall/roles/clotho/tasks/main.yml
@@ -0,0 +1,16 @@
+####################
+#Uninstall clotho
+- name: "[uninstall clotho] stop clotho"
+ systemd:
+ name: clotho
+ state: stopped
+ enabled: no
+ when: uninstall.clotho == 1
+ ignore_errors: true
+
+- name: "[uninstall clotho] uninstall clotho"
+ yum:
+ name:
+ - "{{ clotho }}"
+ state: absent
+ when: uninstall.clotho == 1
diff --git a/uninstall/roles/firewall/tasks/main.yml b/uninstall/roles/firewall/tasks/main.yml
new file mode 100644
index 0000000..8cccb5b
--- /dev/null
+++ b/uninstall/roles/firewall/tasks/main.yml
@@ -0,0 +1,45 @@
+####################
+#Uninstall firewall
+- name: "[uninstall firewall] stop sapp"
+ systemd:
+ name: sapp
+ state: stopped
+ enabled: no
+ when:
+ - uninstall.firewall == 1
+ ignore_errors: true
+
+- name: "[uninstall firewall] uninstall firewall"
+ yum:
+ name:
+ - "{{ capture_packet_plug }}"
+ - "{{ dns }}"
+ - "{{ ftp }}"
+ - "{{ http }}"
+ - "{{ quic }}"
+ - "{{ ssl }}"
+ - "{{ mail }}"
+ - "{{ fw_dns }}"
+ - "{{ fw_ftp }}"
+ - "{{ fw_http }}"
+ - "{{ fw_ssl }}"
+ - "{{ fw_mail }}"
+ state: absent
+ when: uninstall.firewall == 1
+
+- name: "[uninstall firewall] uninstall firewall"
+ yum:
+ name:
+ - "{{ fw_quic }}"
+ - "{{ tsg_conn_record }}"
+ - "{{ tsg_conn_sketch }}"
+ state: absent
+ when: uninstall.firewall == 1
+ ignore_errors: true
+
+- name: "[uninstall firewall] remove /home/mesasoft/sapp_runetc"
+ file:
+ path: /home/mesasoft/sapp_runetc
+ state: absent
+ when: uninstall.firewall == 1
+
diff --git a/uninstall/roles/uninstall_adc_mcn0/tasks/framework_after_20.09.yml b/uninstall/roles/framework/tasks/main.yml
index 064e64b..a17206d 100644
--- a/uninstall/roles/uninstall_adc_mcn0/tasks/framework_after_20.09.yml
+++ b/uninstall/roles/framework/tasks/main.yml
@@ -1,17 +1,4 @@
-- 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
+- name: "[uninstall framework] uninstall framework"
yum:
name:
- "{{ libcjson }}"
@@ -27,12 +14,13 @@
- "{{ libwiredcfg }}"
- "{{ libWiredLB }}"
- "{{ lz4 }}"
- - "{{ libtsglua }}"
state: absent
when: uninstall.framework == 1
-- name: remove framework files
- file:
- path: /opt/MESA
+- name: "[uninstall framework] uninstall framework"
+ yum:
+ name:
+ - "{{ libtsglua }}"
state: absent
- when: remove.framework == 1
+ when: uninstall.framework == 1
+ ignore_errors: true
diff --git a/uninstall/roles/http_healthcheck/tasks/main.yml b/uninstall/roles/http_healthcheck/tasks/main.yml
new file mode 100644
index 0000000..27cedc7
--- /dev/null
+++ b/uninstall/roles/http_healthcheck/tasks/main.yml
@@ -0,0 +1,9 @@
+####################
+#Uninstall http_healthcheck
+- name: "[uninstall http_healthcheck] uninstall http_healthcheck"
+ yum:
+ name:
+ - "{{ http_healthcheck }}"
+ state: absent
+ when: uninstall.http_healthcheck == 1
+
diff --git a/uninstall/roles/kernel/tasks/main.yml b/uninstall/roles/kernel/tasks/main.yml
new file mode 100644
index 0000000..d1755fc
--- /dev/null
+++ b/uninstall/roles/kernel/tasks/main.yml
@@ -0,0 +1,23 @@
+####################
+#Uninstall Kernel
+- name: "[uninstall kernel] reset default kernel"
+ shell: grub2-set-default '{{ origin_kernel }}'
+ when: uninstall.kernel == 1
+
+- name: "[uninstall kernel] reboot"
+ reboot:
+ when: uninstall.kernel == 1
+
+- name: "[uninstall kernel] 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
+
diff --git a/uninstall/roles/kni/tasks/main.yml b/uninstall/roles/kni/tasks/main.yml
new file mode 100644
index 0000000..d0cbd3b
--- /dev/null
+++ b/uninstall/roles/kni/tasks/main.yml
@@ -0,0 +1,18 @@
+####################
+#Uninstall kni
+- name: "[uninstall kni] stop sapp"
+ systemd:
+ name: sapp
+ state: stopped
+ enabled: no
+ when:
+ - uninstall.kni == 1
+ ignore_errors: true
+
+- name: "[uninstall kni] uninstall kni"
+ yum:
+ name:
+ - "{{ kni }}"
+ state: absent
+ when: uninstall.kni == 1
+
diff --git a/uninstall/roles/marsio/tasks/main.yml b/uninstall/roles/marsio/tasks/main.yml
new file mode 100644
index 0000000..8af7055
--- /dev/null
+++ b/uninstall/roles/marsio/tasks/main.yml
@@ -0,0 +1,26 @@
+####################
+#Uninstall Marsio
+- name: "[uninstall marsio] stop mrzcpd"
+ systemd:
+ name: mrzcpd
+ state: stopped
+ enabled: no
+ when:
+ - uninstall.marsio == 1
+ ignore_errors: true
+
+- name: "[uninstall marsio] stop mrtunnat"
+ systemd:
+ name: mrtunnat
+ state: stopped
+ enabled: no
+ when:
+ - uninstall.marsio == 1
+ ignore_errors: true
+
+- name: "[uninstall marsio] uninstall mrzcpd"
+ yum:
+ name:
+ - "{{ mrzcpd }}"
+ state: absent
+ when: uninstall.marsio == 1
diff --git a/uninstall/roles/remove_files/tasks/main.yml b/uninstall/roles/remove_files/tasks/main.yml
new file mode 100644
index 0000000..96caa5c
--- /dev/null
+++ b/uninstall/roles/remove_files/tasks/main.yml
@@ -0,0 +1,90 @@
+- name: "remove /home/mesasoft/sapp_run"
+ file:
+ path: /home/mesasoft/sapp_run
+ state: absent
+ when: remove.sapp == 1
+ ignore_errors: true
+
+- name: "remove sapp.service"
+ file:
+ path: /usr/lib/systemd/system/sapp.service
+ state: absent
+ when: remove.sapp == 1
+ ignore_errors: true
+
+- name: "remove clotho files"
+ file:
+ path: /home/mesasoft/clotho
+ state: absent
+ when: remove.clotho == 1
+ ignore_errors: true
+
+- name: "remove clotho.service"
+ file:
+ path: /usr/lib/systemd/system/clotho.service
+ state: absent
+ when: remove.clotho == 1
+ ignore_errors: true
+
+- name: "remove http_healthcheck files"
+ file:
+ path: /home/mesasoft/http_healthcheck
+ state: absent
+ when: remove.http_healthcheck == 1
+ ignore_errors: true
+
+- name: "remove telegraf_statistic files"
+ file:
+ path: /etc/telegraf/telegraf_statistic.conf
+ state: absent
+ when: remove.telegraf_statistic == 1
+ ignore_errors: true
+
+- name: "remove /tmp/metrics.out"
+ file:
+ path: /tmp/metrics.out
+ state: absent
+ when: remove.telegraf_statistic == 1
+ ignore_errors: true
+
+- name: "remove certstore files"
+ file:
+ path: "{{ certstore_path }}"
+ state: absent
+ vars:
+ certstore_path:
+ - /home/tsg/certstore
+ - /opt/tsg/certstore
+ when: remove.certstore == 1
+ ignore_errors: true
+
+- name: "remove certstore.service"
+ file:
+ path: /usr/lib/systemd/system/certstore.service
+ state: absent
+ when: remove.certstore == 1
+ ignore_errors: true
+
+- name: "remove cert-redis files"
+ file:
+ path: "{{ certredis_path }}"
+ state: absent
+ vars:
+ certredis_path:
+ - /home/tsg/certstore
+ - /opt/tsg/certstore
+ when: remove.certredis == 1
+ ignore_errors: true
+
+- name: "remove /opt/proxy_status"
+ file:
+ path: /opt/proxy_status
+ state: absent
+ ignore_errors: true
+
+- name: "remove /tmp/ansible_deploy"
+ file:
+ path: /tmp/ansible_deploy
+ state: absent
+ ignore_errors: true
+
diff --git a/uninstall/roles/remove_framework_files/tasks/main.yml b/uninstall/roles/remove_framework_files/tasks/main.yml
new file mode 100644
index 0000000..8f5e7b5
--- /dev/null
+++ b/uninstall/roles/remove_framework_files/tasks/main.yml
@@ -0,0 +1,6 @@
+- name: "remove framework files"
+ file:
+ path: /opt/MESA
+ state: absent
+ when: remove.framework == 1
+ ignore_errors: true
diff --git a/uninstall/roles/remove_marsio_files/tasks/main.yml b/uninstall/roles/remove_marsio_files/tasks/main.yml
new file mode 100644
index 0000000..8e877bb
--- /dev/null
+++ b/uninstall/roles/remove_marsio_files/tasks/main.yml
@@ -0,0 +1,21 @@
+- name: "remove marsio files"
+ file:
+ path: /opt/mrzcpd
+ state: absent
+ when: remove.marsio == 1
+ ignore_errors: true
+
+- name: "remove mrzcpd.service"
+ file:
+ path: /usr/lib/systemd/system/mrzcpd.service
+ state: absent
+ when: remove.marsio == 1
+ ignore_errors: true
+
+- name: "remove mrtunnat.service"
+ file:
+ path: /usr/lib/systemd/system/mrtunnat.service
+ state: absent
+ when: remove.marsio == 1
+ ignore_errors: true
+
diff --git a/uninstall/roles/remove_tfe_files/tasks/main.yml b/uninstall/roles/remove_tfe_files/tasks/main.yml
new file mode 100644
index 0000000..f84c689
--- /dev/null
+++ b/uninstall/roles/remove_tfe_files/tasks/main.yml
@@ -0,0 +1,28 @@
+- name: "remove /opt/tsg/tfe"
+ file:
+ path: /opt/tsg/tfe
+ state: absent
+ when: remove.tfe == 1
+ ignore_errors: true
+
+- name: "remove tfe.service"
+ file:
+ path: /usr/lib/systemd/system/tfe.service
+ state: absent
+ when: remove.tfe == 1
+ ignore_errors: true
+
+- name: "remove tfe-env.service"
+ file:
+ path: /usr/lib/systemd/system/tfe-env.service
+ state: absent
+ when: remove.tfe == 1
+ ignore_errors: true
+
+- name: "remove tfe-env-tun-mode.service"
+ file:
+ path: /usr/lib/systemd/system/tfe-env-tun-mode.service
+ state: absent
+ when: remove.tfe == 1
+ ignore_errors: true
+
diff --git a/uninstall/roles/sapp/tasks/main.yml b/uninstall/roles/sapp/tasks/main.yml
new file mode 100644
index 0000000..951f467
--- /dev/null
+++ b/uninstall/roles/sapp/tasks/main.yml
@@ -0,0 +1,17 @@
+####################
+#Uninstall sapp
+- name: "[uninstall sapp] stop sapp"
+ systemd:
+ name: sapp
+ state: stopped
+ enabled: no
+ when:
+ - uninstall.sapp == 1
+ ignore_errors: true
+
+- name: "[uninstall sapp] uninstall sapp"
+ yum:
+ name:
+ - "{{ sapp }}"
+ state: absent
+ when: uninstall.sapp == 1
diff --git a/uninstall/roles/telegraf_statistic/tasks/main.yml b/uninstall/roles/telegraf_statistic/tasks/main.yml
new file mode 100644
index 0000000..c091efc
--- /dev/null
+++ b/uninstall/roles/telegraf_statistic/tasks/main.yml
@@ -0,0 +1,10 @@
+####################
+#Uninstall telegraf_statistic
+- name: "[uninstall telegraf_statistic] stop telegraf_statistic"
+ systemd:
+ name: telegraf_statistic
+ state: stopped
+ enabled: no
+ when: uninstall.telegraf_statistic == 1
+ ignore_errors: true
+
diff --git a/uninstall/roles/tfe/tasks/main.yml b/uninstall/roles/tfe/tasks/main.yml
new file mode 100644
index 0000000..3198b30
--- /dev/null
+++ b/uninstall/roles/tfe/tasks/main.yml
@@ -0,0 +1,26 @@
+####################
+#Uninstall tfe
+- name: "[uninstall tfe] stop tfe"
+ systemd:
+ name: tfe
+ state: stopped
+ enabled: no
+ when:
+ - uninstall.tfe == 1
+ ignore_errors: true
+
+- name: "[uninstall tfe] stop tfe-env"
+ systemd:
+ name: tfe-env
+ state: stopped
+ enabled: no
+ when:
+ - uninstall.tfe == 1
+ ignore_errors: true
+
+- name: "[uninstall tfe] uninstall tfe"
+ yum:
+ name:
+ - "{{ tfe }}"
+ state: absent
+ when: uninstall.tfe == 1
diff --git a/uninstall/roles/tsg_app/tasks/main.yml b/uninstall/roles/tsg_app/tasks/main.yml
new file mode 100644
index 0000000..eefb626
--- /dev/null
+++ b/uninstall/roles/tsg_app/tasks/main.yml
@@ -0,0 +1,24 @@
+####################
+#Tsg-app
+- name: "[uninstall tsg-app] 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] uninstall tsg_app"
+ yum:
+ name:
+ - "{{ app_sketch_local }}"
+ - "{{ app_control_plug }}"
+ - "{{ app_proto_identify }}"
+ - "{{ app_master }}"
+ state: absent
+ when:
+ - uninstall_version >= 20.09
+ - uninstall.tsg_app == 1
+
diff --git a/uninstall/roles/tsg_master/tasks/main.yml b/uninstall/roles/tsg_master/tasks/main.yml
new file mode 100644
index 0000000..ebd7d17
--- /dev/null
+++ b/uninstall/roles/tsg_master/tasks/main.yml
@@ -0,0 +1,18 @@
+####################
+#Uninstall tsg_master
+- name: "[uninstall tsg_master] stop sapp"
+ systemd:
+ name: sapp
+ state: stopped
+ enabled: no
+ when:
+ - uninstall.tsgmaster == 1
+ ignore_errors: true
+
+- name: "[uninstall tsg_master] uninstall tsg_master"
+ yum:
+ name:
+ - "{{ tsg_master }}"
+ state: absent
+ when: uninstall.tsgmaster == 1
+
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
deleted file mode 100644
index 49d6e27..0000000
--- a/uninstall/roles/uninstall_adc_mcn0/tasks/certredis_after_20.09.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-- 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
deleted file mode 100644
index a63754b..0000000
--- a/uninstall/roles/uninstall_adc_mcn0/tasks/certredis_before_20.09.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-- 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
deleted file mode 100644
index 42f00c4..0000000
--- a/uninstall/roles/uninstall_adc_mcn0/tasks/certstore_after_20.09.yml
+++ /dev/null
@@ -1,42 +0,0 @@
-- 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
deleted file mode 100644
index b874377..0000000
--- a/uninstall/roles/uninstall_adc_mcn0/tasks/certstore_before_20.09.yml
+++ /dev/null
@@ -1,42 +0,0 @@
-- 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_before_20.09.yml b/uninstall/roles/uninstall_adc_mcn0/tasks/framework_before_20.09.yml
deleted file mode 100644
index 4cd6777..0000000
--- a/uninstall/roles/uninstall_adc_mcn0/tasks/framework_before_20.09.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-- 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
deleted file mode 100644
index a4c6498..0000000
--- a/uninstall/roles/uninstall_adc_mcn0/tasks/main.yml
+++ /dev/null
@@ -1,480 +0,0 @@
-####################
-#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
-
-####################
-#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_proto_identify }}"
- - "{{ app_master }}"
- state: absent
- when:
- - uninstall_version >= 20.09
- - uninstall.tsg_app == 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: uninstall certstore before 20.09
- include: certstore_before_20.09.yml
- when: uninstall_version < 20.09
-
-- name: uninstall certstore after 20.09
- include: certstore_after_20.09.yml
- when: uninstall_version >= 20.09
-
-####################
-#Uninstall cert-redis
-- 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
-
-
-####################
-#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: uninstall framework before 20.09
- include: framework_before_20.09.yml
- when: uninstall_version < 20.09
-
-- name: uninstall framework after 20.09
- include: framework_after_20.09.yml
- when: uninstall_version >= 20.09
-
-####################
-#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
-
-####################
-#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:
- 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
diff --git a/uninstall/roles/uninstall_adc_mcn123/tasks/main.yml b/uninstall/roles/uninstall_adc_mcn123/tasks/main.yml
deleted file mode 100644
index 9675614..0000000
--- a/uninstall/roles/uninstall_adc_mcn123/tasks/main.yml
+++ /dev/null
@@ -1,189 +0,0 @@
-####################
-#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
-
diff --git a/uninstall/roles/uninstall_server/tasks/certredis_after_20.09.yml b/uninstall/roles/uninstall_server/tasks/certredis_after_20.09.yml
deleted file mode 100644
index e06eda9..0000000
--- a/uninstall/roles/uninstall_server/tasks/certredis_after_20.09.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-- name: "[certredis after 20.09] stop cert-redis"
- systemd:
- name: cert-redis
- state: stopped
- enabled: no
- when: uninstall.certredis == 1
- ignore_errors: true
-
-- name: "[certredis after 20.09] 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
deleted file mode 100644
index bcb77c0..0000000
--- a/uninstall/roles/uninstall_server/tasks/certredis_before_20.09.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-- name: "[certredis before 20.09] stop cert-redis"
- systemd:
- name: cert-redis
- state: stopped
- enabled: no
- when: uninstall.certredis == 1
- ignore_errors: true
-
-- name: "[certredis before 20.09] 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
deleted file mode 100644
index 109d763..0000000
--- a/uninstall/roles/uninstall_server/tasks/certstore_after_20.09.yml
+++ /dev/null
@@ -1,42 +0,0 @@
-- name: "[certstore after 20.09] stop certstore"
- systemd:
- name: certstore
- state: stopped
- enabled: no
- when:
- - backup.certstore == 1
- - uninstall.certstore == 1
- ignore_errors: true
-
-- name: "[certstore after 20.09] create backup_dest_path"
- file:
- path: "{{ backup_dest_path }}"
- state: directory
- when: backup.certstore == 1
-
-- name: "[certstore after 20.09] 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: "[certstore after 20.09] uninstall certstore"
- yum:
- name:
- - "{{ certstore }}"
- state: absent
- when: uninstall.certstore == 1
-
-- name: "[certstore after 20.09] remove certstore files"
- file:
- path: /opt/tsg/certstore
- state: absent
- when: remove.certstore == 1
-
-- name: "[certstore after 20.09] 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
deleted file mode 100644
index 86044cb..0000000
--- a/uninstall/roles/uninstall_server/tasks/certstore_before_20.09.yml
+++ /dev/null
@@ -1,42 +0,0 @@
-- name: "[certstore before 20.09] stop certstore"
- systemd:
- name: certstore
- state: stopped
- enabled: no
- when:
- - backup.certstore == 1
- - uninstall.certstore == 1
- ignore_errors: true
-
-- name: "[certstore before 20.09] create backup_dest_path"
- file:
- path: "{{ backup_dest_path }}"
- state: directory
- when: backup.certstore == 1
-
-- name: "[certstore before 20.09] 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: "[certstore before 20.09] uninstall certstore"
- yum:
- name:
- - "{{ certstore }}"
- state: absent
- when: uninstall.certstore == 1
-
-- name: "[certstore before 20.09] remove certstore files"
- file:
- path: /home/tsg/certstore
- state: absent
- when: remove.certstore == 1
-
-- name: "[certstore before 20.09] 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
deleted file mode 100644
index 68753a4..0000000
--- a/uninstall/roles/uninstall_server/tasks/framework_after_20.09.yml
+++ /dev/null
@@ -1,38 +0,0 @@
-- name: "[framework after 20.09] create backup_dest_path"
- file:
- path: "{{ backup_dest_path }}"
- state: directory
- when: backup.framework == 1
-
-- name: "[framework after 20.09] 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: "[framework after 20.09] 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: "[framework after 20.09] 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
deleted file mode 100644
index 2a227cb..0000000
--- a/uninstall/roles/uninstall_server/tasks/framework_before_20.09.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-- name: "[framework before 20.09] create backup_dest_path"
- file:
- path: "{{ backup_dest_path }}"
- state: directory
- when: backup.framework == 1
-
-- name: "[framework before 20.09] 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: "[framework before 20.09] 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: "[framework before 20.09] 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
deleted file mode 100644
index 7251a08..0000000
--- a/uninstall/roles/uninstall_server/tasks/main.yml
+++ /dev/null
@@ -1,523 +0,0 @@
-####################
-#Uninstall Kernel
-- name: "[uninstall kernel] reset default kernel"
- shell: grub2-set-default '{{ origin_kernel }}'
- when: uninstall.kernel == 1
-
-- name: "[uninstall kernel] reboot"
- reboot:
- when: uninstall.kernel == 1
-
-- name: "[uninstall kernel] 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: "[uninstall marsio] stop mrzcpd"
- systemd:
- name: mrzcpd
- state: stopped
- enabled: no
- when:
- - backup.marsio == 1
- - uninstall.marsio == 1
- ignore_errors: true
-
-- name: "[uninstall marsio] stop mrtunnat"
- systemd:
- name: mrtunnat
- state: stopped
- enabled: no
- when:
- - backup.marsio == 1
- - uninstall.marsio == 1
- ignore_errors: true
-
-- name: "[uninstall marsio] create backup_dest_path"
- file:
- path: "{{ backup_dest_path }}"
- state: directory
- when: backup.marsio == 1
-
-- name: "[uninstall marsio] 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 marsio] uninstall mrzcpd"
- yum:
- name:
- - "{{ mrzcpd }}"
- state: absent
- when: uninstall.marsio == 1
-
-- name: "[uninstall marsio] remove marsio files"
- file:
- path: /opt/mrzcpd
- state: absent
- when: remove.marsio == 1
-
-- name: "[uninstall marsio] remove mrzcpd.service"
- file:
- path: /usr/lib/systemd/system/mrzcpd.service
- state: absent
- when: remove.marsio == 1
-
-- name: "[uninstall marsio] remove mrtunnat.service"
- file:
- path: /usr/lib/systemd/system/mrtunnat.service
- state: absent
- when: remove.marsio == 1
-
-####################
-#Uninstall kni
-- name: "[uninstall kni] stop sapp"
- systemd:
- name: sapp
- state: stopped
- enabled: no
- when:
- - backup.kni == 1
- - uninstall.kni == 1
- ignore_errors: true
-
-- name: "[uninstall kni] create backup_dest_path"
- file:
- path: "{{ backup_dest_path }}"
- state: directory
- when: backup.kni == 1
-
-- name: "[uninstall kni] 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: "[uninstall kni] 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: "[uninstall kni] judge plug.zip"
- shell: "ls {{ backup_dest_path }}/sapp_plug_{{ uninstall_version }}_{{ date }}.zip"
- register: return
- ignore_errors: true
-
-- name: "[uninstall kni] uninstall kni"
- yum:
- name:
- - "{{ kni }}"
- state: absent
- when: uninstall.kni == 1
-
-- name: "[uninstall kni] remove kni files"
- file:
- path: /home/mesasoft/sapp_run/etc/kni/
- state: absent
- when: remove.kni == 1
-####################
-#Tsg-app
-- name: "[uninstall tsg-app] 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] uninstall tsg_app"
- yum:
- name:
- - "{{ app_sketch_local }}"
- - "{{ app_control_plug }}"
- - "{{ app_proto_identify }}"
- - "{{ app_master }}"
- state: absent
- when:
- - uninstall_version >= 20.09
- - uninstall.tsg_app == 1
-
-####################
-#Uninstall tsg_master
-- name: "[uninstall tsg_master] stop sapp"
- systemd:
- name: sapp
- state: stopped
- enabled: no
- when:
- - backup.sapp_tsgconf == 1
- - uninstall.tsgmaster == 1
- ignore_errors: true
-
-- name: "[uninstall tsg_master] create backup_dest_path"
- file:
- path: "{{ backup_dest_path }}"
- state: directory
- when: backup.sapp_tsgconf == 1
-
-- name: "[uninstall tsg_master] 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: "[uninstall tsg_master] 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] uninstall tsg_master"
- yum:
- name:
- - "{{ tsg_master }}"
- state: absent
- when: uninstall.tsgmaster == 1
-
-####################
-#Uninstall firewall
-- name: "[uninstall firewall] stop sapp"
- systemd:
- name: sapp
- state: stopped
- enabled: no
- when:
- - backup.sapp_conf == 1
- - uninstall.firewall == 1
- ignore_errors: true
-
-- name: "[uninstall firewall] create backup_dest_path"
- file:
- path: "{{ backup_dest_path }}"
- state: directory
- when: backup.sapp_conf == 1
-
-- name: "[uninstall firewall] create /home/mesasoft/sapp_runetc/"
- file:
- path: /home/mesasoft/sapp_runetc/
- state: directory
- when: backup.sapp_conf == 1
-
-- name: "[uninstall firewall] create entrylist.conf"
- file:
- path: /home/mesasoft/sapp_runetc/entrylist.conf
- state: touch
- when: backup.sapp_conf == 1
-
-- name: "[uninstall firewall] 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: "[uninstall firewall] 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] uninstall firewall"
- yum:
- name:
- - "{{ capture_packet_plug }}"
- - "{{ dns }}"
- - "{{ ftp }}"
- - "{{ http }}"
- - "{{ quic }}"
- - "{{ ssl }}"
- - "{{ mail }}"
- - "{{ fw_dns }}"
- - "{{ fw_ftp }}"
- - "{{ fw_http }}"
- - "{{ fw_ssl }}"
- - "{{ fw_mail }}"
- state: absent
- when: uninstall.firewall == 1
-
-- name: "[uninstall firewall] uninstall firewall"
- yum:
- name:
- - "{{ fw_quic }}"
- - "{{ tsg_conn_record }}"
- - "{{ tsg_conn_sketch }}"
- state: absent
- when: uninstall.firewall == 1
- ignore_errors: true
-
-- name: "[uninstall firewall] remove /home/mesasoft/sapp_runetc"
- file:
- path: /home/mesasoft/sapp_runetc
- state: absent
- when: uninstall.firewall == 1
-
-####################
-#Uninstall sapp
-- name: "[uninstall sapp] stop sapp"
- systemd:
- name: sapp
- state: stopped
- enabled: no
- when:
- - backup.sapp_etc == 1
- - uninstall.sapp == 1
- ignore_errors: true
-
-- name: "[uninstall sapp] create backup_dest_path"
- file:
- path: "{{ backup_dest_path }}"
- state: directory
- when: backup.sapp_etc == 1
-
-- name: "[uninstall sapp] 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] 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: "[uninstall sapp] remove sapp.service"
- file:
- path: /usr/lib/systemd/system/sapp.service
- state: absent
- when: remove.sapp == 1
-
-####################
-#Uninstall tfe
-- name: "[uninstall tfe] stop tfe"
- systemd:
- name: tfe
- state: stopped
- enabled: no
- when:
- - backup.tfe == 1
- - uninstall.tfe == 1
- ignore_errors: true
-
-- name: "[uninstall tfe] stop tfe-env"
- systemd:
- name: tfe-env
- state: stopped
- enabled: no
- when:
- - backup.tfe == 1
- - uninstall.tfe == 1
- ignore_errors: true
-
-- name: "[uninstall tfe] create backup_dest_path"
- file:
- path: "{{ backup_dest_path }}"
- state: directory
- when: backup.tfe == 1
-
-- name: "[uninstall tfe] 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] uninstall tfe"
- yum:
- name:
- - "{{ tfe }}"
- state: absent
- when: uninstall.tfe == 1
-
-- name: "[uninstall tfe] remove /opt/tsg/tfe"
- file:
- path: /opt/tsg/tfe
- state: absent
- when: remove.tfe == 1
-
-- name: "[uninstall tfe] remove tfe.service"
- file:
- path: /usr/lib/systemd/system/tfe.service
- state: absent
- when: remove.tfe == 1
-
-- name: "[uninstall tfe] remove tfe-env.service"
- file:
- path: /usr/lib/systemd/system/tfe-env.service
- state: absent
- when: remove.tfe == 1
-
-- name: "[uninstall tfe] 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: uninstall certstore before 20.09
- include: certstore_before_20.09.yml
- when: uninstall_version < 20.09
-
-- name: uninstall certstore after 20.09
- include: certstore_after_20.09.yml
- when: uninstall_version >= 20.09
-
-####################
-#Uninstall cert-redis
-- 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
-
-####################
-#Uninstall clotho
-- name: "[uninstall clotho] stop clotho"
- systemd:
- name: clotho
- state: stopped
- enabled: no
- when: uninstall.clotho == 1
- ignore_errors: true
-
-- name: "[uninstall clotho] uninstall clotho"
- yum:
- name:
- - "{{ clotho }}"
- state: absent
- when: uninstall.clotho == 1
-
-- name: "[uninstall clotho] remove clotho files"
- file:
- path: /home/mesasoft/clotho
- state: absent
- when: remove.clotho == 1
-
-- name: "[uninstall clotho] remove clotho.service"
- file:
- path: /usr/lib/systemd/system/clotho.service
- state: absent
- when: remove.clotho == 1
-
-####################
-#Uninstall http_healthcheck
-- name: "[uninstall http_healthcheck] uninstall http_healthcheck"
- yum:
- name:
- - "{{ http_healthcheck }}"
- state: absent
- when: uninstall.http_healthcheck == 1
-
-- name: "[uninstall http_healthcheck] remove http_healthcheck files"
- file:
- path: /home/mesasoft/http_healthcheck
- state: absent
- when: remove.http_healthcheck == 1
-
-####################
-#Uninstall framework
-- name: uninstall framework before 20.09
- include: framework_before_20.09.yml
- when: uninstall_version < 20.09
-
-- name: uninstall framework after 20.09
- include: framework_after_20.09.yml
- when: uninstall_version >= 20.09
-
-####################
-#Uninstall telegraf_statistic
-- name: "[uninstall telegraf_statistic] stop telegraf_statistic"
- systemd:
- name: telegraf_statistic
- state: stopped
- enabled: no
- when: uninstall.telegraf_statistic == 1
- ignore_errors: true
-
-- name: "[uninstall telegraf_statistic] uninstall telegraf_statistic"
- yum:
- name:
- - "{{ telegraf_statistic }}"
- state: absent
- when: uninstall.telegraf_statistic == 1
-
-- name: "[uninstall telegraf_statistic] remove telegraf_statistic files"
- file:
- path: /etc/telegraf/telegraf_statistic.conf
- state: absent
- when: remove.telegraf_statistic == 1
-
-- name: "[uninstall telegraf_statistic] 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
diff --git a/uninstall/uninstall_config/group_vars/uninstall_vars.yml b/uninstall/uninstall_config/group_vars/uninstall_vars.yml
index d20a1d6..b6a94ae 100644
--- a/uninstall/uninstall_config/group_vars/uninstall_vars.yml
+++ b/uninstall/uninstall_config/group_vars/uninstall_vars.yml
@@ -8,47 +8,43 @@ uninstall_version: 20.09
backup_dest_path: /root/backup_data
date: 20200921
backup:
+ tsg_env: 1
marsio: 1
- tfe: 1
+ framework: 1
+ sapp_etc: 1
sapp_plug: 1
sapp_tsgconf: 1
+ sapp_appconf: 1
sapp_conf: 1
- sapp_etc: 1
- kni: 1
- certstore: 1
- framework: 1
+ tfe: 1
####################
#Uninstall list
uninstall:
- kernel: 1
- framework: 1
+ kernel: 0
marsio: 1
- sapp: 1
+ kni: 1
+ tsg_app: 1
tsgmaster: 1
firewall: 1
- kni: 1
+ sapp: 1
tfe: 1
certstore: 1
certredis: 1
clotho: 1
http_healthcheck: 1
+ framework: 1
telegraf_statistic: 1
- tsg_env_tun_mode: 1
- tsg_app: 1
tsg_diagnose: 0
####################
#Remove list
remove:
+ framework: 1
marsio: 1
- kni: 1
- certstore: 1
sapp: 1
tfe: 1
- certredis: 1
clotho: 1
http_healthcheck: 1
- framework: 1
telegraf_statistic: 1
diff --git a/uninstall/uninstall_tsg.yml b/uninstall/uninstall_tsg.yml
index f474533..b03ed66 100644
--- a/uninstall/uninstall_tsg.yml
+++ b/uninstall/uninstall_tsg.yml
@@ -1,7 +1,29 @@
- hosts: uninstall_server
remote_user: root
roles:
- - uninstall_server
+ - backup_framework_config
+ - backup_marsio_config
+ - backup_sapp_config
+ - backup_tfe_config
+ - backup_tsgenv_config
+ - kernel
+ - marsio
+ - kni
+ - tsg_app
+ - tsg_master
+ - firewall
+ - sapp
+ - tfe
+ - certstore
+ - cert_redis
+ - clotho
+ - http_healthcheck
+ - framework
+ - telegraf_statistic
+ - remove_files
+ - remove_framework_files
+ - remove_marsio_files
+ - remove_tfe_files
vars_files:
- uninstall_config/group_vars/uninstall_vars.yml
- roles/package_list/20.09.yml
@@ -9,7 +31,26 @@
- hosts: uninstall_adc_mcn0
remote_user: root
roles:
- - uninstall_adc_mcn0
+ - backup_framework_config
+ - backup_marsio_config
+ - backup_sapp_config
+ - backup_tsgenv_config
+ - kernel
+ - marsio
+ - kni
+ - tsg_app
+ - tsg_master
+ - firewall
+ - sapp
+ - certstore
+ - cert_redis
+ - clotho
+ - http_healthcheck
+ - framework
+ - telegraf_statistic
+ - remove_files
+ - remove_framework_files
+ - remove_marsio_files
vars_files:
- uninstall_config/group_vars/uninstall_vars.yml
- roles/package_list/20.09.yml
@@ -17,7 +58,17 @@
- hosts: uninstall_adc_mcn123
remote_user: root
roles:
- - uninstall_adc_mcn123
+ - backup_framework_config
+ - backup_marsio_config
+ - backup_tfe_config
+ - backup_tsgenv_config
+ - kernel
+ - marsio
+ - tfe
+ - framework
+ - remove_framework_files
+ - remove_marsio_files
+ - remove_tfe_files
vars_files:
- uninstall_config/group_vars/uninstall_vars.yml
- roles/package_list/20.09.yml