This is an automated email from the ASF dual-hosted git repository.

dimuthuupe pushed a commit to branch staging
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/staging by this push:
     new 3b50920  Deleting lib, bin and conf directories when updating helix in 
ansible
3b50920 is described below

commit 3b5092048074143287a6aaae8a388a08982093ec
Author: Dimuthu Wannipurage <[email protected]>
AuthorDate: Fri Mar 29 14:09:01 2019 -0400

    Deleting lib, bin and conf directories when updating helix in ansible
---
 dev-tools/ansible/roles/helix_setup/tasks/main.yml | 19 ++++++++++++++++
 dev-tools/ansible/roles/job_monitor/tasks/main.yml | 26 +++++++++++++++++-----
 2 files changed, 39 insertions(+), 6 deletions(-)

diff --git a/dev-tools/ansible/roles/helix_setup/tasks/main.yml 
b/dev-tools/ansible/roles/helix_setup/tasks/main.yml
index 8578727..90f0a29 100644
--- a/dev-tools/ansible/roles/helix_setup/tasks/main.yml
+++ b/dev-tools/ansible/roles/helix_setup/tasks/main.yml
@@ -50,6 +50,25 @@
   - { command: ./bin/post-wm-daemon.sh stop, dir: "{{ helix_post_wm_version 
}}" }
   ignore_errors: yes
 
+- name: Delete lib, conf, bin directories of the distributions
+  file:
+    state: absent
+    path: "{{ helix_dir }}/{{ item }}"
+  with_items:
+  - "{{ helix_controller_version }}/lib"
+  - "{{ helix_controller_version }}/bin"
+  - "{{ helix_controller_version }}/conf"
+  - "{{ helix_participant_version }}/lib"
+  - "{{ helix_participant_version }}/bin"
+  - "{{ helix_participant_version }}/conf"
+  - "{{ helix_pre_wm_version }}/lib"
+  - "{{ helix_pre_wm_version }}/bin"
+  - "{{ helix_pre_wm_version }}/conf"
+  - "{{ helix_post_wm_version }}/lib"
+  - "{{ helix_post_wm_version }}/bin"
+  - "{{ helix_post_wm_version }}/conf"
+  ignore_errors: yes
+
 # Copy required distributions to the deployment directory
 - name: Copy distributions to airavata-helix deployment directory
   unarchive: "src={{ airavata_source_dir 
}}/modules/airavata-helix/helix-distribution/target/{{ item }}
diff --git a/dev-tools/ansible/roles/job_monitor/tasks/main.yml 
b/dev-tools/ansible/roles/job_monitor/tasks/main.yml
index 386a06f..f01b2b4 100644
--- a/dev-tools/ansible/roles/job_monitor/tasks/main.yml
+++ b/dev-tools/ansible/roles/job_monitor/tasks/main.yml
@@ -24,6 +24,26 @@
 - name: Create helix deployment directory
   file: path="{{ helix_dir }}" state=directory owner={{ user }} group={{ group 
}}
 
+- name: Stop daemons
+  command: "{{ item.command }} chdir={{ helix_dir }}/{{ item.dir }}/"
+  with_items:
+  - { command: ./bin/email-monitor-daemon.sh stop, dir: "{{ 
email_monitor_version }}" }
+  - { command: ./bin/realtime-monitor-daemon.sh stop, dir: "{{ 
realtime_monitor_version }}" }
+  ignore_errors: yes
+
+- name: Delete lib, conf, bin directories of the distributions
+  file:
+    state: absent
+    path: "{{ helix_dir }}/{{ item }}"
+  with_items:
+  - "{{ email_monitor_version }}/lib"
+  - "{{ email_monitor_version }}/bin"
+  - "{{ email_monitor_version }}/conf"
+  - "{{ realtime_monitor_version }}/lib"
+  - "{{ realtime_monitor_version }}/bin"
+  - "{{ realtime_monitor_version }}/conf"
+  ignore_errors: yes
+
 # Copy job monitoring distributions to the deployment directory
 - name: Copy Job monitoring distributions to airavata-helix deployment 
directory
   unarchive: "src={{ airavata_source_dir 
}}/modules/job-monitor/job-monitor-distribution/target/{{ item }}
@@ -67,12 +87,6 @@
   - "{{ email_monitor_log_dir }}"
   - "{{ realtime_monitor_log_dir }}"
 
-- name: Stop daemons
-  command: "{{ item.command }} chdir={{ helix_dir }}/{{ item.dir }}/"
-  with_items:
-  - { command: ./bin/email-monitor-daemon.sh stop, dir: "{{ 
email_monitor_version }}" }
-  - { command: ./bin/realtime-monitor-daemon.sh stop, dir: "{{ 
realtime_monitor_version }}" }
-
 # Run bash-scripts
 - name: Start daemons
   command: "{{ item.command }} chdir={{ helix_dir }}/{{ item.dir }}/"

Reply via email to