Skip to content

Commit

Permalink
Modified the cleanup task in hyberconverged cassandra playbooks
Browse files Browse the repository at this point in the history
Signed-off-by: sathyaseelan <sathyaseelan.n@cloudbyte.com>
  • Loading branch information
sathyaseelan committed Oct 9, 2018
1 parent 0923a71 commit 4619dc5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
ns: "{{ namespace }}"
app_yml: "{{ stateful_yaml_alias }}"

- name: Delete cassandra loadgen pod
include_tasks: "{{utils_path}}/delete_deploy.yml"
vars:
ns: "{{ namespace }}"
app_yml: "{{ loadgen_yaml_alias }}"

- name: Get cassandra pvcs
shell: source ~/.profile; kubectl get pvc -n {{ namespace }} -o custom-columns=:metadata.name --no-headers | grep cassandra-data
args:
Expand Down Expand Up @@ -63,6 +57,12 @@
changed_when: true
ignore_errors: true

- name: Delete cassandra loadgen pod
include_tasks: "{{utils_path}}/delete_deploy.yml"
vars:
ns: "{{ namespace }}"
app_yml: "{{ loadgen_yaml_alias }}"

- name: Delete namespace
shell: source ~/.profile; kubectl delete ns {{ namespace }}
args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@
delegate_to: "{{groups['kubernetes-kubemasters'].0}}"
changed_when: True

- name: Delete cassandra loadgen pod
shell: source {{ profile }}; kubectl delete -f {{ result_kube_home.stdout }}/{{ loadgen_yaml_alias }} -n {{ namespace }}
args:
executable: /bin/bash
delegate_to: "{{groups['kubernetes-kubemasters'].0}}"
changed_when: True

- name: Get pvcs
shell: source {{ profile }}; kubectl get pvc -n {{ namespace }} -o custom-columns=:metadata.name --no-headers | grep cassandra-data
args:
Expand Down Expand Up @@ -66,6 +59,13 @@
changed_when: true
ignore_errors: true

- name: Delete cassandra loadgen pod
shell: source {{ profile }}; kubectl delete -f {{ result_kube_home.stdout }}/{{ loadgen_yaml_alias }} -n {{ namespace }}
args:
executable: /bin/bash
delegate_to: "{{groups['kubernetes-kubemasters'].0}}"
changed_when: True

- name: Remove test artifacts
file:
path: "{{ result_kube_home.stdout }}/{{ item }}"
Expand Down

0 comments on commit 4619dc5

Please sign in to comment.