summaryrefslogtreecommitdiffstats
path: root/roles/openshift_hosted_logging
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2016-06-03 16:32:04 -0600
committerRich Megginson <rmeggins@redhat.com>2016-07-22 15:30:00 -0600
commitd66f7edf5a4a750bddcc4f04ef27c52b805c4063 (patch)
tree78722306344608f5dc77ea9e9835e9dae949e352 /roles/openshift_hosted_logging
parentcd46274c9d52dab3553f3f88fca37bf2a93c9068 (diff)
downloadopenshift-d66f7edf5a4a750bddcc4f04ef27c52b805c4063.tar.gz
openshift-d66f7edf5a4a750bddcc4f04ef27c52b805c4063.tar.bz2
openshift-d66f7edf5a4a750bddcc4f04ef27c52b805c4063.tar.xz
openshift-d66f7edf5a4a750bddcc4f04ef27c52b805c4063.zip
do not create logging project if it already exists
Diffstat (limited to 'roles/openshift_hosted_logging')
-rw-r--r--roles/openshift_hosted_logging/tasks/deploy_logging.yaml7
1 files changed, 7 insertions, 0 deletions
diff --git a/roles/openshift_hosted_logging/tasks/deploy_logging.yaml b/roles/openshift_hosted_logging/tasks/deploy_logging.yaml
index 072f7bb4e..5a0544674 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: >