summaryrefslogtreecommitdiffstats
path: root/roles/openshift_metrics
diff options
context:
space:
mode:
authorJason DeTiberus <detiber@gmail.com>2017-01-20 16:40:44 -0500
committerGitHub <noreply@github.com>2017-01-20 16:40:44 -0500
commit00b178ec89934ee1fec3f64ec4bc6d53cb05a9e4 (patch)
treea3aebc5d703986c4af800c0d7ff3842c58db1230 /roles/openshift_metrics
parentc045e2efef32a067150eaf37a898bb8eb4a7b2c1 (diff)
parentdcc4165b72b16a98d7ff8e0f94d5c08beffe820d (diff)
downloadopenshift-00b178ec89934ee1fec3f64ec4bc6d53cb05a9e4.tar.gz
openshift-00b178ec89934ee1fec3f64ec4bc6d53cb05a9e4.tar.bz2
openshift-00b178ec89934ee1fec3f64ec4bc6d53cb05a9e4.tar.xz
openshift-00b178ec89934ee1fec3f64ec4bc6d53cb05a9e4.zip
Merge pull request #3128 from jcantrill/3127_oc_apply_for_metrics
fixes #3127. Get files for oc_apply from remote host
Diffstat (limited to 'roles/openshift_metrics')
-rw-r--r--roles/openshift_metrics/tasks/install_metrics.yaml16
1 files changed, 12 insertions, 4 deletions
diff --git a/roles/openshift_metrics/tasks/install_metrics.yaml b/roles/openshift_metrics/tasks/install_metrics.yaml
index bab37dbfb..ddaa54438 100644
--- a/roles/openshift_metrics/tasks/install_metrics.yaml
+++ b/roles/openshift_metrics/tasks/install_metrics.yaml
@@ -20,15 +20,23 @@
loop_control:
loop_var: include_file
+- find: paths={{ mktemp.stdout }}/templates patterns=*.yaml
+ register: object_def_files
+ changed_when: no
+
+- slurp: src={{item.path}}
+ register: object_defs
+ with_items: "{{object_def_files.files}}"
+ changed_when: no
+
- 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"
+ file_name: "{{ item.source }}"
+ file_content: "{{ item.content | b64decode | from_yaml }}"
+ with_items: "{{ object_defs.results }}"
- name: Scaling up cluster
include: start_metrics.yaml