Code Review
/
ealt-edge.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
cadvisor pod using kubectl commands added
[ealt-edge.git]
/
ocd
/
infra
/
playbooks
/
roles
/
cadvisor
/
tasks
/
uninstall.yml
diff --git
a/ocd/infra/playbooks/roles/cAdvisor/tasks/uninstall.yml
b/ocd/infra/playbooks/roles/cadvisor/tasks/uninstall.yml
similarity index 62%
rename from
ocd/infra/playbooks/roles/cAdvisor/tasks/uninstall.yml
rename to
ocd/infra/playbooks/roles/cadvisor/tasks/uninstall.yml
index
53a7e62
..
93e6b7d
100644
(file)
--- a/
ocd/infra/playbooks/roles/cAdvisor/tasks/uninstall.yml
+++ b/
ocd/infra/playbooks/roles/cadvisor/tasks/uninstall.yml
@@
-13,25
+13,14
@@
# limitations under the License.
---
# limitations under the License.
---
-
-- name: check if cadvisor is installed before deleting
+- name: check if cadvisor is installed before removing
shell:
shell:
- cmd:
helm status
cadvisor
+ cmd:
kubectl get pods | grep
cadvisor
register: result
register: result
- failed_when: false
- no_log: True
-
-- debug:
- msg: cAdvisor is not present
- when: result.rc == 2
-
-- meta: end_play
- when: result.rc == 2
+ ignore_errors: 'True'
-- name: "If cAdvisor present, then list helm ls"
- command: helm ls
- when: result is succeeded
-
-- name: "Uninstall cadvisor"
- command: helm delete cadvisor
+- name: Uninstallation of cadvisor
+ shell:
+ cmd: kubectl delete -f /tmp/cadvisor/dep.yaml
when: result is succeeded
when: result is succeeded
+ ignore_errors: 'True'