summaryrefslogtreecommitdiffstats
path: root/roles/openshift_hosted_logging
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2016-10-24 09:19:04 -0400
committerGitHub <noreply@github.com>2016-10-24 09:19:04 -0400
commit6796a7b5bcfe391bf4affaf17c8b9a05a82be58f (patch)
tree3ad52f5b0112fc411ac4a52f9a9a1b3a1fc8e26a /roles/openshift_hosted_logging
parentb5570b656e59756ad6ea5b24be253f15d0e3ca41 (diff)
parent9293059f5d331e26fc86c9fc841e2a57fcba8ae6 (diff)
downloadopenshift-6796a7b5bcfe391bf4affaf17c8b9a05a82be58f.tar.gz
openshift-6796a7b5bcfe391bf4affaf17c8b9a05a82be58f.tar.bz2
openshift-6796a7b5bcfe391bf4affaf17c8b9a05a82be58f.tar.xz
openshift-6796a7b5bcfe391bf4affaf17c8b9a05a82be58f.zip
Merge pull request #2573 from abutcher/infra-templates
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 -"