diff options
author | Scott Dodson <sdodson@redhat.com> | 2017-01-17 15:33:43 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-17 15:33:43 -0500 |
commit | a269ece3556932cebfa2ade968ac2b8638c2abbf (patch) | |
tree | bb690323269d929c9582756b4a77c8189217dcf4 /roles/openshift_metrics/tasks/install_metrics.yaml | |
parent | e810fb6abab0c6fe9198bfc3f39c82ca8054f76e (diff) | |
parent | 65eb7e43faf38698b22b90ad3c743d1fecdc0961 (diff) | |
download | openshift-a269ece3556932cebfa2ade968ac2b8638c2abbf.tar.gz openshift-a269ece3556932cebfa2ade968ac2b8638c2abbf.tar.bz2 openshift-a269ece3556932cebfa2ade968ac2b8638c2abbf.tar.xz openshift-a269ece3556932cebfa2ade968ac2b8638c2abbf.zip |
Merge pull request #2873 from jcantrill/295_metrics_admin_again
Move Metrics to ansible from deployer
Diffstat (limited to 'roles/openshift_metrics/tasks/install_metrics.yaml')
-rw-r--r-- | roles/openshift_metrics/tasks/install_metrics.yaml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/roles/openshift_metrics/tasks/install_metrics.yaml b/roles/openshift_metrics/tasks/install_metrics.yaml new file mode 100644 index 000000000..bab37dbfb --- /dev/null +++ b/roles/openshift_metrics/tasks/install_metrics.yaml @@ -0,0 +1,37 @@ +--- +- name: Check that hawkular_metrics_hostname is set + fail: msg='the openshift_metrics_hawkular_hostname variable is required' + when: openshift_metrics_hawkular_hostname is not defined + +- name: Check the value of openshift_metrics_cassandra_storage_type + fail: + msg: > + openshift_metrics_cassandra_storage_type ({{ openshift_metrics_cassandra_storage_type }}) + is invalid, must be one of: emptydir, pv, dynamic + when: openshift_metrics_cassandra_storage_type not in openshift_metrics_cassandra_storage_types + +- name: Install Metrics + include: "{{ role_path }}/tasks/install_{{ include_file }}.yaml" + with_items: + - support + - heapster + - hawkular + - cassandra + loop_control: + loop_var: include_file + +- name: Create objects + include: oc_apply.yaml + vars: + kubeconfig: "{{ mktemp.stdout }}/admin.kubeconfig" + namespace: "{{ openshift_metrics_project }}" + file_name: "{{ item }}" + file_content: "{{ lookup('file',item) | from_yaml }}" + with_fileglob: + - "{{ mktemp.stdout }}/templates/*.yaml" + +- name: Scaling up cluster + include: start_metrics.yaml + tags: openshift_metrics_start_cluster + when: + - openshift_metrics_start_cluster | default(true) | bool |