diff options
author | Scott Dodson <sdodson@redhat.com> | 2016-09-01 15:03:42 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-01 15:03:42 -0400 |
commit | 16616b6978a1f32c5e70a5d5c140bdde9e7c3616 (patch) | |
tree | 7a728f02210cc2c817ae66795949e5ffb96b49be /roles | |
parent | 4538366d8e7533ef5b82b9d073fd0212e7321c0c (diff) | |
parent | 3e74a0846e3fb18a4d553bc4a30f3c73a0e98cc0 (diff) | |
download | openshift-16616b6978a1f32c5e70a5d5c140bdde9e7c3616.tar.gz openshift-16616b6978a1f32c5e70a5d5c140bdde9e7c3616.tar.bz2 openshift-16616b6978a1f32c5e70a5d5c140bdde9e7c3616.tar.xz openshift-16616b6978a1f32c5e70a5d5c140bdde9e7c3616.zip |
Merge pull request #2198 from richm/various-logging-enhancements
Various logging enhancements
Diffstat (limited to 'roles')
-rw-r--r-- | roles/openshift_hosted_logging/tasks/deploy_logging.yaml | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/roles/openshift_hosted_logging/tasks/deploy_logging.yaml b/roles/openshift_hosted_logging/tasks/deploy_logging.yaml index 072f7bb4e..f19ce3e2b 100644 --- a/roles/openshift_hosted_logging/tasks/deploy_logging.yaml +++ b/roles/openshift_hosted_logging/tasks/deploy_logging.yaml @@ -14,9 +14,16 @@ cp {{ openshift_master_config_dir }}/admin.kubeconfig {{ mktemp.stdout }}/admin.kubeconfig changed_when: False + - 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 + ignore_errors: True + - name: "Create logging project" command: > {{ openshift.common.admin_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig new-project logging + when: logging_project_result.stdout == "" - name: "Changing projects" command: > @@ -60,12 +67,14 @@ - name: "Create deployer template" command: > - {{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig create -f /usr/share/openshift/examples/infrastructure-templates/enterprise/logging-deployer.yaml -n openshift + {{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig create -f /usr/share/openshift/examples/infrastructure-templates/enterprise/logging-deployer.yaml register: template_output failed_when: "template_output.rc == 1 and 'exists' not in template_output.stderr" - name: "Process the deployer template" - shell: "{{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig process logging-deployer-template -n openshift -v {{ oc_process_values }} | {{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig create -f -" + shell: "{{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig process logging-deployer-template -v {{ oc_process_values }} | {{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig create -f -" + register: process_deployer + failed_when: process_deployer.rc == 1 and 'already exists' not in process_deployer.stderr - name: "Wait for image pull and deployer pod" shell: "{{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig get pods | grep logging-deployer.*Completed" @@ -76,6 +85,8 @@ - name: "Process support template" shell: "{{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig process logging-support-template | {{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig create -f -" + register: process_support + failed_when: process_support.rc == 1 and 'already exists' not in process_support.stderr - name: "Set insecured registry" command: "{{ openshift.common.client_binary }} --config={{ mktemp.stdout }}/admin.kubeconfig annotate is --all openshift.io/image.insecureRepository=true --overwrite" |