2017-02-27 13:47:03 +00:00
|
|
|
---
|
2017-03-01 12:54:26 +00:00
|
|
|
- name: Heapster | Lay Down Heapster Templates
|
|
|
|
template:
|
|
|
|
src={{item.file}}
|
|
|
|
dest={{kube_config_dir}}/{{item.file}}
|
2017-02-27 13:47:03 +00:00
|
|
|
with_items:
|
2017-03-01 12:54:26 +00:00
|
|
|
- {file: grafana-deploy.yml, type: deployment, name: monitoring-grafana}
|
|
|
|
- {file: grafana-svc.yml, type: svc, name: monitoring-grafana}
|
|
|
|
- {file: heapster-deploy.yml, type: deployment, name: heapster}
|
|
|
|
- {file: heapster-svc.yml, type: svc, name: heapster}
|
|
|
|
- {file: influxdb-deploy.yml, type: deployment, name: monitoring-influxdb}
|
|
|
|
- {file: influxdb-svc.yml, type: svc, name: monitoring-influxdb}
|
|
|
|
register: heapster_deploy_manifests
|
2017-02-27 13:47:03 +00:00
|
|
|
when: inventory_hostname == groups['kube-master'][0]
|
|
|
|
|
2017-03-01 12:54:26 +00:00
|
|
|
- name: Heapster | Start Resources
|
2017-02-27 13:47:03 +00:00
|
|
|
kube:
|
|
|
|
name: "{{item.item.name}}"
|
|
|
|
namespace: "{{heapster_namespace}}"
|
|
|
|
kubectl: "{{bin_dir}}/kubectl"
|
|
|
|
resource: "{{item.item.type}}"
|
|
|
|
filename: "{{kube_config_dir}}/{{item.item.file}}"
|
|
|
|
state: "{{item.changed | ternary('latest','present') }}"
|
2017-03-01 12:54:26 +00:00
|
|
|
with_items: "{{ heapster_deploy_manifests.changed }}"
|
2017-02-27 13:47:03 +00:00
|
|
|
when: inventory_hostname == groups['kube-master'][0]
|