-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
None
-
NDS Sprint 16, NDS Sprint 17
A prime example of something that is not idempotent and could be:
###########################
|
# Prometheus Dashboard
|
###########################
|
- name: Prometheus Dashboard status
|
command: kubectl get svc prometheus --namespace=kube-system
|
register: promdash
|
failed_when: promdash.rc < 0
|
|
- name: PushGateway status
|
command: kubectl get svc pushgateway --namespace=kube-system
|
register: pushgateway
|
failed_when: pushgateway.rc < 0
|
|
- name: Cluster Metrics - Prometheus Dashboard| create prometheus stack
|
command: kubectl create --namespace=kube-system -f "/tmp/prometheus-service.json" -f "/tmp/pushgateway-service.json" -f "/tmp/prometheus-all.json"
|
when: enablepromdash is defined and (promdash.rc != 0 or pushgateway.rc != 0)
|
This code fails due to a typo in the final "when" clause (the OR should be an AND)
Fixing the typo makes this segment idempotent.
This ticket is complete when the change has been made.
- is related to
-
NDS-628 When is ansible re-runnable?
-
- Open
-