update
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
14
uninstall/roles/backup_framework_config/tasks/main.yml
Normal file
14
uninstall/roles/backup_framework_config/tasks/main.yml
Normal file
@@ -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
|
||||
|
||||
13
uninstall/roles/backup_marsio_config/tasks/main.yml
Normal file
13
uninstall/roles/backup_marsio_config/tasks/main.yml
Normal file
@@ -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
|
||||
47
uninstall/roles/backup_sapp_config/tasks/main.yml
Normal file
47
uninstall/roles/backup_sapp_config/tasks/main.yml
Normal file
@@ -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
|
||||
|
||||
|
||||
21
uninstall/roles/backup_tfe_config/tasks/main.yml
Normal file
21
uninstall/roles/backup_tfe_config/tasks/main.yml
Normal file
@@ -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
|
||||
13
uninstall/roles/backup_tsgenv_config/tasks/main.yml
Normal file
13
uninstall/roles/backup_tsgenv_config/tasks/main.yml
Normal file
@@ -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
|
||||
7
uninstall/roles/cert_redis/tasks/main.yml
Normal file
7
uninstall/roles/cert_redis/tasks/main.yml
Normal file
@@ -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
|
||||
16
uninstall/roles/certstore/tasks/main.yml
Normal file
16
uninstall/roles/certstore/tasks/main.yml
Normal file
@@ -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
|
||||
|
||||
16
uninstall/roles/clotho/tasks/main.yml
Normal file
16
uninstall/roles/clotho/tasks/main.yml
Normal file
@@ -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
|
||||
45
uninstall/roles/firewall/tasks/main.yml
Normal file
45
uninstall/roles/firewall/tasks/main.yml
Normal file
@@ -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
|
||||
|
||||
@@ -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
|
||||
9
uninstall/roles/http_healthcheck/tasks/main.yml
Normal file
9
uninstall/roles/http_healthcheck/tasks/main.yml
Normal file
@@ -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
|
||||
|
||||
23
uninstall/roles/kernel/tasks/main.yml
Normal file
23
uninstall/roles/kernel/tasks/main.yml
Normal file
@@ -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
|
||||
|
||||
18
uninstall/roles/kni/tasks/main.yml
Normal file
18
uninstall/roles/kni/tasks/main.yml
Normal file
@@ -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
|
||||
|
||||
26
uninstall/roles/marsio/tasks/main.yml
Normal file
26
uninstall/roles/marsio/tasks/main.yml
Normal file
@@ -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
|
||||
90
uninstall/roles/remove_files/tasks/main.yml
Normal file
90
uninstall/roles/remove_files/tasks/main.yml
Normal file
@@ -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
|
||||
|
||||
6
uninstall/roles/remove_framework_files/tasks/main.yml
Normal file
6
uninstall/roles/remove_framework_files/tasks/main.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
- name: "remove framework files"
|
||||
file:
|
||||
path: /opt/MESA
|
||||
state: absent
|
||||
when: remove.framework == 1
|
||||
ignore_errors: true
|
||||
21
uninstall/roles/remove_marsio_files/tasks/main.yml
Normal file
21
uninstall/roles/remove_marsio_files/tasks/main.yml
Normal file
@@ -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
|
||||
|
||||
28
uninstall/roles/remove_tfe_files/tasks/main.yml
Normal file
28
uninstall/roles/remove_tfe_files/tasks/main.yml
Normal file
@@ -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
|
||||
|
||||
17
uninstall/roles/sapp/tasks/main.yml
Normal file
17
uninstall/roles/sapp/tasks/main.yml
Normal file
@@ -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
|
||||
10
uninstall/roles/telegraf_statistic/tasks/main.yml
Normal file
10
uninstall/roles/telegraf_statistic/tasks/main.yml
Normal file
@@ -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
|
||||
|
||||
26
uninstall/roles/tfe/tasks/main.yml
Normal file
26
uninstall/roles/tfe/tasks/main.yml
Normal file
@@ -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
|
||||
24
uninstall/roles/tsg_app/tasks/main.yml
Normal file
24
uninstall/roles/tsg_app/tasks/main.yml
Normal file
@@ -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
|
||||
|
||||
18
uninstall/roles/tsg_master/tasks/main.yml
Normal file
18
uninstall/roles/tsg_master/tasks/main.yml
Normal file
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user