summaryrefslogtreecommitdiffstats
path: root/roles/openshift_metrics
diff options
context:
space:
mode:
authorewolinetz <ewolinet@redhat.com>2017-05-02 13:27:22 -0500
committerewolinetz <ewolinet@redhat.com>2017-05-02 13:27:22 -0500
commit845c523efbd89c3bd1b601ca0589e13e81651f1d (patch)
tree58f216d2634c3303657c73049b04d2416bf9a275 /roles/openshift_metrics
parent0ea1e389625341bebececce9a56aebc616decd8d (diff)
downloadopenshift-845c523efbd89c3bd1b601ca0589e13e81651f1d.tar.gz
openshift-845c523efbd89c3bd1b601ca0589e13e81651f1d.tar.bz2
openshift-845c523efbd89c3bd1b601ca0589e13e81651f1d.tar.xz
openshift-845c523efbd89c3bd1b601ca0589e13e81651f1d.zip
Modified pick from release-1.5 for updating hawkular htpasswd generation
Diffstat (limited to 'roles/openshift_metrics')
-rw-r--r--roles/openshift_metrics/tasks/generate_hawkular_certificates.yaml16
1 files changed, 9 insertions, 7 deletions
diff --git a/roles/openshift_metrics/tasks/generate_hawkular_certificates.yaml b/roles/openshift_metrics/tasks/generate_hawkular_certificates.yaml
index 07b7eca33..fb4fe2f03 100644
--- a/roles/openshift_metrics/tasks/generate_hawkular_certificates.yaml
+++ b/roles/openshift_metrics/tasks/generate_hawkular_certificates.yaml
@@ -14,20 +14,22 @@
changed_when: no
- name: generate password for hawkular metrics
- local_action: copy dest="{{ local_tmp.stdout}}/{{ item }}.pwd" content="{{ 15 | oo_random_word }}"
+ local_action: copy dest="{{ local_tmp.stdout }}/{{ item }}.pwd" content="{{ 15 | oo_random_word }}"
with_items:
- hawkular-metrics
+- local_action: slurp src="{{ local_tmp.stdout }}/hawkular-metrics.pwd"
+ register: hawkular_metrics_pwd
+ no_log: true
+
- name: generate htpasswd file for hawkular metrics
- local_action: >
- shell htpasswd -ci
- '{{ local_tmp.stdout }}/hawkular-metrics.htpasswd' hawkular
- < '{{ local_tmp.stdout }}/hawkular-metrics.pwd'
+ local_action: htpasswd path="{{ local_tmp.stdout }}/hawkular-metrics.htpasswd" name=hawkular password="{{ hawkular_metrics_pwd.content | b64decode }}"
+ no_log: true
- name: copy local generated passwords to target
copy:
- src: "{{local_tmp.stdout}}/{{item}}"
- dest: "{{mktemp.stdout}}/{{item}}"
+ src: "{{ local_tmp.stdout }}/{{ item }}"
+ dest: "{{ mktemp.stdout }}/{{ item }}"
with_items:
- hawkular-metrics.pwd
- hawkular-metrics.htpasswd