summaryrefslogtreecommitdiffstats
path: root/roles/openshift_hosted_logging
diff options
context:
space:
mode:
authorAndrew Butcher <abutcher@redhat.com>2016-10-07 16:58:36 -0400
committerAndrew Butcher <abutcher@redhat.com>2016-10-21 16:37:51 -0400
commit9293059f5d331e26fc86c9fc841e2a57fcba8ae6 (patch)
tree3ad52f5b0112fc411ac4a52f9a9a1b3a1fc8e26a /roles/openshift_hosted_logging
parentb5570b656e59756ad6ea5b24be253f15d0e3ca41 (diff)
downloadopenshift-9293059f5d331e26fc86c9fc841e2a57fcba8ae6.tar.gz
openshift-9293059f5d331e26fc86c9fc841e2a57fcba8ae6.tar.bz2
openshift-9293059f5d331e26fc86c9fc841e2a57fcba8ae6.tar.xz
openshift-9293059f5d331e26fc86c9fc841e2a57fcba8ae6.zip
Move infrastructure templates into openshift_hosted_templates role.
Diffstat (limited to 'roles/openshift_hosted_logging')
-rw-r--r--roles/openshift_hosted_logging/defaults/main.yml2
-rw-r--r--roles/openshift_hosted_logging/tasks/deploy_logging.yaml12
2 files changed, 9 insertions, 5 deletions
diff --git a/roles/openshift_hosted_logging/defaults/main.yml b/roles/openshift_hosted_logging/defaults/main.yml
index e357899e5..a01f24df8 100644
--- a/roles/openshift_hosted_logging/defaults/main.yml
+++ b/roles/openshift_hosted_logging/defaults/main.yml
@@ -1,2 +1,2 @@
---
-examples_base: "{{ openshift.common.config_base if openshift.common.is_containerized | bool else '/usr/share/openshift' }}/examples"
+hosted_base: "{{ openshift.common.config_base if openshift.common.is_containerized | bool else '/usr/share/openshift' }}/hosted"
diff --git a/roles/openshift_hosted_logging/tasks/deploy_logging.yaml b/roles/openshift_hosted_logging/tasks/deploy_logging.yaml
index c8d376194..0162d1fb0 100644
--- a/roles/openshift_hosted_logging/tasks/deploy_logging.yaml
+++ b/roles/openshift_hosted_logging/tasks/deploy_logging.yaml
@@ -17,7 +17,7 @@
cp {{ openshift_master_config_dir }}/admin.kubeconfig {{ mktemp.stdout }}/admin.kubeconfig
changed_when: False
- - name: Check for logging project already exists
+ - name: "Check for logging project already exists"
command: >
{{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig get project logging -o jsonpath='{.metadata.name}'
register: logging_project_result
@@ -40,9 +40,13 @@
- name: "Create templates for logging accounts and the deployer"
command: >
- {{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig create -f {{ examples_base }}/infrastructure-templates/{{ 'enterprise' if openshift_deployment_type == 'openshift-enterprise' else 'origin' }}/logging-deployer.yaml
- register: template_output
- failed_when: "template_output.rc == 1 and 'exists' not in template_output.stderr"
+ {{ openshift.common.client_binary }} create
+ -f {{ hosted_base }}/logging-deployer.yaml
+ --config={{ mktemp.stdout }}/admin.kubeconfig
+ -n logging
+ register: logging_import_template
+ failed_when: "'already exists' not in logging_import_template.stderr and logging_import_template.rc != 0"
+ changed_when: "'created' in logging_import_template.stdout"
- name: "Process the logging accounts template"
shell: "{{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig process logging-deployer-account-template | {{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig create -f -"