summaryrefslogtreecommitdiff
path: root/uninstall/roles
diff options
context:
space:
mode:
authorzhangzhihan <[email protected]>2020-09-21 23:14:14 +0800
committerzhangzhihan <[email protected]>2020-09-21 23:14:14 +0800
commit37dab8e8425a98a9ddc72ddf1c635de2fdaac514 (patch)
treecf8705cb2ee29cb53ff7735cfa9557da66360404 /uninstall/roles
parent05b56cb4ec1aa29f036b2cc3eba3b6adf9c676ee (diff)
update
Diffstat (limited to 'uninstall/roles')
-rw-r--r--uninstall/roles/uninstall_server/tasks/certredis_after_20.09.yml4
-rw-r--r--uninstall/roles/uninstall_server/tasks/certredis_before_20.09.yml4
-rw-r--r--uninstall/roles/uninstall_server/tasks/certstore_after_20.09.yml12
-rw-r--r--uninstall/roles/uninstall_server/tasks/certstore_before_20.09.yml12
-rw-r--r--uninstall/roles/uninstall_server/tasks/framework_after_20.09.yml8
-rw-r--r--uninstall/roles/uninstall_server/tasks/framework_before_20.09.yml8
-rw-r--r--uninstall/roles/uninstall_server/tasks/main.yml116
7 files changed, 82 insertions, 82 deletions
diff --git a/uninstall/roles/uninstall_server/tasks/certredis_after_20.09.yml b/uninstall/roles/uninstall_server/tasks/certredis_after_20.09.yml
index 49d6e27..e06eda9 100644
--- a/uninstall/roles/uninstall_server/tasks/certredis_after_20.09.yml
+++ b/uninstall/roles/uninstall_server/tasks/certredis_after_20.09.yml
@@ -1,4 +1,4 @@
-- name: stop cert-redis
+- name: "[certredis after 20.09] stop cert-redis"
systemd:
name: cert-redis
state: stopped
@@ -6,7 +6,7 @@
when: uninstall.certredis == 1
ignore_errors: true
-- name: remove cert-redis files
+- name: "[certredis after 20.09] remove cert-redis files"
file:
path: /opt/tsg/cert-redis
state: absent
diff --git a/uninstall/roles/uninstall_server/tasks/certredis_before_20.09.yml b/uninstall/roles/uninstall_server/tasks/certredis_before_20.09.yml
index a63754b..bcb77c0 100644
--- a/uninstall/roles/uninstall_server/tasks/certredis_before_20.09.yml
+++ b/uninstall/roles/uninstall_server/tasks/certredis_before_20.09.yml
@@ -1,4 +1,4 @@
-- name: stop cert-redis
+- name: "[certredis before 20.09] stop cert-redis"
systemd:
name: cert-redis
state: stopped
@@ -6,7 +6,7 @@
when: uninstall.certredis == 1
ignore_errors: true
-- name: remove cert-redis files
+- name: "[certredis before 20.09] remove cert-redis files"
file:
path: /home/tsg/cert-redis
state: absent
diff --git a/uninstall/roles/uninstall_server/tasks/certstore_after_20.09.yml b/uninstall/roles/uninstall_server/tasks/certstore_after_20.09.yml
index 42f00c4..109d763 100644
--- a/uninstall/roles/uninstall_server/tasks/certstore_after_20.09.yml
+++ b/uninstall/roles/uninstall_server/tasks/certstore_after_20.09.yml
@@ -1,4 +1,4 @@
-- name: stop certstore
+- name: "[certstore after 20.09] stop certstore"
systemd:
name: certstore
state: stopped
@@ -8,33 +8,33 @@
- uninstall.certstore == 1
ignore_errors: true
-- name: create backup_dest_path
+- name: "[certstore after 20.09] create backup_dest_path"
file:
path: "{{ backup_dest_path }}"
state: directory
when: backup.certstore == 1
-- name: backup /opt/tsg/certstore to destination path
+- 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: uninstall certstore
+- name: "[certstore after 20.09] uninstall certstore"
yum:
name:
- "{{ certstore }}"
state: absent
when: uninstall.certstore == 1
-- name: remove certstore files
+- name: "[certstore after 20.09] remove certstore files"
file:
path: /opt/tsg/certstore
state: absent
when: remove.certstore == 1
-- name: remove certstore.service
+- name: "[certstore after 20.09] remove certstore.service"
file:
path: /usr/lib/systemd/system/certstore.service
state: absent
diff --git a/uninstall/roles/uninstall_server/tasks/certstore_before_20.09.yml b/uninstall/roles/uninstall_server/tasks/certstore_before_20.09.yml
index b874377..86044cb 100644
--- a/uninstall/roles/uninstall_server/tasks/certstore_before_20.09.yml
+++ b/uninstall/roles/uninstall_server/tasks/certstore_before_20.09.yml
@@ -1,4 +1,4 @@
-- name: stop certstore
+- name: "[certstore before 20.09] stop certstore"
systemd:
name: certstore
state: stopped
@@ -8,33 +8,33 @@
- uninstall.certstore == 1
ignore_errors: true
-- name: create backup_dest_path
+- name: "[certstore before 20.09] create backup_dest_path"
file:
path: "{{ backup_dest_path }}"
state: directory
when: backup.certstore == 1
-- name: backup /home/tsg/certstore to destination path
+- 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: uninstall certstore
+- name: "[certstore before 20.09] uninstall certstore"
yum:
name:
- "{{ certstore }}"
state: absent
when: uninstall.certstore == 1
-- name: remove certstore files
+- name: "[certstore before 20.09] remove certstore files"
file:
path: /home/tsg/certstore
state: absent
when: remove.certstore == 1
-- name: remove certstore.service
+- name: "[certstore before 20.09] remove certstore.service"
file:
path: /usr/lib/systemd/system/certstore.service
state: absent
diff --git a/uninstall/roles/uninstall_server/tasks/framework_after_20.09.yml b/uninstall/roles/uninstall_server/tasks/framework_after_20.09.yml
index 064e64b..68753a4 100644
--- a/uninstall/roles/uninstall_server/tasks/framework_after_20.09.yml
+++ b/uninstall/roles/uninstall_server/tasks/framework_after_20.09.yml
@@ -1,17 +1,17 @@
-- name: create backup_dest_path
+- name: "[framework after 20.09] create backup_dest_path"
file:
path: "{{ backup_dest_path }}"
state: directory
when: backup.framework == 1
-- name: backup /home/tsg/certstore to destination path
+- 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: uninstall framework
+- name: "[framework after 20.09] uninstall framework"
yum:
name:
- "{{ libcjson }}"
@@ -31,7 +31,7 @@
state: absent
when: uninstall.framework == 1
-- name: remove framework files
+- name: "[framework after 20.09] remove framework files"
file:
path: /opt/MESA
state: absent
diff --git a/uninstall/roles/uninstall_server/tasks/framework_before_20.09.yml b/uninstall/roles/uninstall_server/tasks/framework_before_20.09.yml
index ba9b710..2a227cb 100644
--- a/uninstall/roles/uninstall_server/tasks/framework_before_20.09.yml
+++ b/uninstall/roles/uninstall_server/tasks/framework_before_20.09.yml
@@ -1,17 +1,17 @@
-- name: create backup_dest_path
+- name: "[framework before 20.09] create backup_dest_path"
file:
path: "{{ backup_dest_path }}"
state: directory
when: backup.framework == 1
-- name: backup /opt/MESA to destination path
+- 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: uninstall framework
+- name: "[framework before 20.09] uninstall framework"
yum:
name:
- "{{ libcjson }}"
@@ -30,7 +30,7 @@
state: absent
when: uninstall.framework == 1
-- name: remove framework files
+- name: "[framework before 20.09] remove framework files"
file:
path: /opt/MESA
state: absent
diff --git a/uninstall/roles/uninstall_server/tasks/main.yml b/uninstall/roles/uninstall_server/tasks/main.yml
index 91c7c7e..80cfb02 100644
--- a/uninstall/roles/uninstall_server/tasks/main.yml
+++ b/uninstall/roles/uninstall_server/tasks/main.yml
@@ -1,14 +1,14 @@
####################
#Uninstall Kernel
-- name: "reset default kernel"
+- name: "[uninstall kernel] reset default kernel"
shell: grub2-set-default '{{ origin_kernel }}'
when: uninstall.kernel == 1
-- name: "reboot"
+- name: "[uninstall kernel] reboot"
reboot:
when: uninstall.kernel == 1
-- name: "uninstall tfe-kmod and kernel"
+- name: "[uninstall kernel] uninstall tfe-kmod and kernel"
yum:
name:
- "{{ tfe_kmod }}"
@@ -23,7 +23,7 @@
####################
#Uninstall Marsio
-- name: stop mrzcpd
+- name: "[uninstall marsio] stop mrzcpd"
systemd:
name: mrzcpd
state: stopped
@@ -33,7 +33,7 @@
- uninstall.marsio == 1
ignore_errors: true
-- name: stop mrtunnat
+- name: "[uninstall marsio] stop mrtunnat"
systemd:
name: mrtunnat
state: stopped
@@ -43,39 +43,39 @@
- uninstall.marsio == 1
ignore_errors: true
-- name: create backup_dest_path
+- name: "[uninstall marsio] create backup_dest_path"
file:
path: "{{ backup_dest_path }}"
state: directory
when: backup.marsio == 1
-- name: backup /opt/mrzcpd to destination path
+- 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 mrzcpd
+- name: "[uninstall marsio] uninstall mrzcpd"
yum:
name:
- "{{ mrzcpd }}"
state: absent
when: uninstall.marsio == 1
-- name: remove marsio files
+- name: "[uninstall marsio] remove marsio files"
file:
path: /opt/mrzcpd
state: absent
when: remove.marsio == 1
-- name: remove mrzcpd.service
+- name: "[uninstall marsio] remove mrzcpd.service"
file:
path: /usr/lib/systemd/system/mrzcpd.service
state: absent
when: remove.marsio == 1
-- name: remove mrtunnat.service
+- name: "[uninstall marsio] remove mrtunnat.service"
file:
path: /usr/lib/systemd/system/mrtunnat.service
state: absent
@@ -83,7 +83,7 @@
####################
#Uninstall kni
-- name: stop sapp
+- name: "[uninstall kni] stop sapp"
systemd:
name: sapp
state: stopped
@@ -93,46 +93,46 @@
- uninstall.kni == 1
ignore_errors: true
-- name: create backup_dest_path
+- name: "[uninstall kni] create backup_dest_path"
file:
path: "{{ backup_dest_path }}"
state: directory
when: backup.kni == 1
-- name: backup sapp_run/etc/kni/ to destination path
+- 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: backup sapp_run/plug to destination path
+- 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: "judge plug.zip"
+- 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
+- name: "[uninstall kni] uninstall kni"
yum:
name:
- "{{ kni }}"
state: absent
when: uninstall.kni == 1
-- name: remove kni files
+- name: "[uninstall kni] remove kni files"
file:
path: /home/mesasoft/sapp_run/etc/kni/
state: absent
when: remove.kni == 1
####################
#Tsg-app
-- name: stop sapp
+- name: "[uninstall tsg-app] stop sapp"
systemd:
name: sapp
state: stopped
@@ -142,7 +142,7 @@
- uninstall.tsg_app == 1
ignore_errors: true
-- name: uninstall tsg_app
+- name: "[uninstall tsg-app] uninstall tsg_app"
yum:
name:
- "{{ app_sketch_local }}"
@@ -155,7 +155,7 @@
####################
#Uninstall tsg_master
-- name: stop sapp
+- name: "[uninstall tsg_master] stop sapp"
systemd:
name: sapp
state: stopped
@@ -165,20 +165,20 @@
- uninstall.tsgmaster == 1
ignore_errors: true
-- name: create backup_dest_path
+- name: "[uninstall tsg_master] create backup_dest_path"
file:
path: "{{ backup_dest_path }}"
state: directory
when: backup.sapp_tsgconf == 1
-- name: backup sapp_run/tsgconf/ to destination path
+- 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: backup sapp_run/plug to destination path
+- 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"
@@ -187,7 +187,7 @@
- backup.sapp_plug == 1
- return.rc != 0
-- name: uninstall tsg_master
+- name: "[uninstall tsg_master] uninstall tsg_master"
yum:
name:
- "{{ tsg_master }}"
@@ -196,7 +196,7 @@
####################
#Uninstall firewall
-- name: stop sapp
+- name: "[uninstall firewall] stop sapp"
systemd:
name: sapp
state: stopped
@@ -206,32 +206,32 @@
- uninstall.firewall == 1
ignore_errors: true
-- name: create backup_dest_path
+- name: "[uninstall firewall] create backup_dest_path"
file:
path: "{{ backup_dest_path }}"
state: directory
when: backup.sapp_conf == 1
-- name: create /home/mesasoft/sapp_runetc/
+- name: "[uninstall firewall] create /home/mesasoft/sapp_runetc/"
file:
path: /home/mesasoft/sapp_runetc/
state: directory
when: backup.sapp_conf == 1
-- name: create entrylist.conf
+- name: "[uninstall firewall] 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
+- 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: backup sapp_run/plug to destination path
+- 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"
@@ -240,7 +240,7 @@
- backup.sapp_plug == 1
- return.rc != 0
-- name: uninstall firewall
+- name: "[uninstall firewall] uninstall firewall"
yum:
name:
- "{{ capture_packet_plug }}"
@@ -259,7 +259,7 @@
state: absent
when: uninstall.firewall == 1
-- name: uninstall firewall
+- name: "[uninstall firewall] uninstall firewall"
yum:
name:
- "{{ fw_quic }}"
@@ -268,7 +268,7 @@
when: uninstall.firewall == 1
ignore_errors: true
-- name: remove /home/mesasoft/sapp_runetc
+- name: "[uninstall firewall] remove /home/mesasoft/sapp_runetc"
file:
path: /home/mesasoft/sapp_runetc
state: absent
@@ -276,7 +276,7 @@
####################
#Uninstall sapp
-- name: stop sapp
+- name: "[uninstall sapp] stop sapp"
systemd:
name: sapp
state: stopped
@@ -286,20 +286,20 @@
- uninstall.sapp == 1
ignore_errors: true
-- name: create backup_dest_path
+- name: "[uninstall sapp] create backup_dest_path"
file:
path: "{{ backup_dest_path }}"
state: directory
when: backup.sapp_etc == 1
-- name: backup sapp_run/etc to destination path
+- 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
+- name: "[uninstall sapp] uninstall sapp"
yum:
name:
- "{{ sapp }}"
@@ -317,7 +317,7 @@
# - backup.sapp_etc == 1
# - backup.sapp_conf == 1
-- name: remove sapp.service
+- name: "[uninstall sapp] remove sapp.service"
file:
path: /usr/lib/systemd/system/sapp.service
state: absent
@@ -325,7 +325,7 @@
####################
#Uninstall tfe
-- name: stop tfe
+- name: "[uninstall tfe] stop tfe"
systemd:
name: tfe
state: stopped
@@ -335,7 +335,7 @@
- uninstall.tfe == 1
ignore_errors: true
-- name: stop tfe-env
+- name: "[uninstall tfe] stop tfe-env"
systemd:
name: tfe-env
state: stopped
@@ -345,45 +345,45 @@
- uninstall.tfe == 1
ignore_errors: true
-- name: create backup_dest_path
+- name: "[uninstall tfe] create backup_dest_path"
file:
path: "{{ backup_dest_path }}"
state: directory
when: backup.tfe == 1
-- name: backup /opt/tsg/tfe/conf to destination path
+- 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
+- name: "[uninstall tfe] uninstall tfe"
yum:
name:
- "{{ tfe }}"
state: absent
when: uninstall.tfe == 1
-- name: remove /opt/tsg/tfe
+- name: "[uninstall tfe] remove /opt/tsg/tfe"
file:
path: /opt/tsg/tfe
state: absent
when: remove.tfe == 1
-- name: remove tfe.service
+- name: "[uninstall tfe] remove tfe.service"
file:
path: /usr/lib/systemd/system/tfe.service
state: absent
when: remove.tfe == 1
-- name: remove tfe-env.service
+- name: "[uninstall tfe] 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
+- name: "[uninstall tfe] remove tfe-env-tun-mode.service"
file:
path: /usr/lib/systemd/system/tfe-env-tun-mode.service
state: absent
@@ -411,7 +411,7 @@
####################
#Uninstall clotho
-- name: stop clotho
+- name: "[uninstall clotho] stop clotho"
systemd:
name: clotho
state: stopped
@@ -419,20 +419,20 @@
when: uninstall.clotho == 1
ignore_errors: true
-- name: uninstall clotho
+- name: "[uninstall clotho] uninstall clotho"
yum:
name:
- "{{ clotho }}"
state: absent
when: uninstall.clotho == 1
-- name: remove clotho files
+- name: "[uninstall clotho] remove clotho files"
file:
path: /home/mesasoft/clotho
state: absent
when: remove.clotho == 1
-- name: remove clotho.service
+- name: "[uninstall clotho] remove clotho.service"
file:
path: /usr/lib/systemd/system/clotho.service
state: absent
@@ -440,14 +440,14 @@
####################
#Uninstall http_healthcheck
-- name: uninstall http_healthcheck
+- name: "[uninstall http_healthcheck] uninstall http_healthcheck"
yum:
name:
- "{{ http_healthcheck }}"
state: absent
when: uninstall.http_healthcheck == 1
-- name: remove http_healthcheck files
+- name: "[uninstall http_healthcheck] remove http_healthcheck files"
file:
path: /home/mesasoft/http_healthcheck
state: absent
@@ -465,7 +465,7 @@
####################
#Uninstall telegraf_statistic
-- name: stop telegraf_statistic
+- name: "[uninstall telegraf_statistic] stop telegraf_statistic"
systemd:
name: telegraf_statistic
state: stopped
@@ -473,20 +473,20 @@
when: uninstall.telegraf_statistic == 1
ignore_errors: true
-- name: uninstall telegraf_statistic
+- name: "[uninstall telegraf_statistic] uninstall telegraf_statistic"
yum:
name:
- "{{ telegraf_statistic }}"
state: absent
when: uninstall.telegraf_statistic == 1
-- name: remove telegraf_statistic files
+- name: "[uninstall telegraf_statistic] remove telegraf_statistic files"
file:
path: /etc/telegraf/telegraf_statistic.conf
state: absent
when: remove.telegraf_statistic == 1
-- name: remove /tmp/metrics.out
+- name: "[uninstall telegraf_statistic] remove /tmp/metrics.out"
file:
path: /tmp/metrics.out
state: absent