From c22d70bcdd667808af5dbea1858462620568742e Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Sun, 12 Feb 2023 21:44:19 +0100 Subject: [PATCH] add deconfigure tasks --- roles/deploy-web/tasks/deconfigure.yml | 28 ++++++++++++++++++++++++++ roles/deploy-web/tasks/main.yml | 6 +++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 roles/deploy-web/tasks/deconfigure.yml diff --git a/roles/deploy-web/tasks/deconfigure.yml b/roles/deploy-web/tasks/deconfigure.yml new file mode 100644 index 0000000..21e3c60 --- /dev/null +++ b/roles/deploy-web/tasks/deconfigure.yml @@ -0,0 +1,28 @@ + + + +- name: Deconfigure stats script + import_tasks: deconfigure_stats.yml + tags: [ "deconfigure", "stats"] + +- name: Deconfigure blacklist script + import_tasks: deconfigure_blacklist.yml + tags: [ "deconfigure", "blacklist" ] + + +- name: Deconfigure supervision script + import_tasks: deconfigure_supervision.yml + tags: [ "deconfigure", "supervision" ] + + - name: Remove sentinel directory + file: + state: absent + path: "{{ item }}/sentinel" + with_items: + - /usr/local/bin + - /etc + vars: + ansible_become: yes + ansible_become_method: sudo + ansible_become_password: "{{ sudo_password }}" + tags: [ "deconfigure", "stats", "blacklist", "supervision"] \ No newline at end of file diff --git a/roles/deploy-web/tasks/main.yml b/roles/deploy-web/tasks/main.yml index 092474b..63983af 100644 --- a/roles/deploy-web/tasks/main.yml +++ b/roles/deploy-web/tasks/main.yml @@ -9,4 +9,8 @@ - name: Destrpy project web import_tasks: destroy.yml - tags: ["destroy"] \ No newline at end of file + tags: ["destroy"] + +- name: Configure project web + import_tasks: configure.yml + tags: [ "deconfigure" ] \ No newline at end of file