From 05b4327fd431dab374bad27ab4cb5069a31b8dc2 Mon Sep 17 00:00:00 2001 From: ramamani yeleswarapu Date: Thu, 6 Sep 2018 00:20:30 -0700 Subject: [stor4nfv] Update k8s scenarios Makes a few changes to 'stor4nfv' role to create csi pods. Change-Id: I179b82ddb524738a42ff1f7dcd36424d50a5c502 Signed-off-by: ramamani yeleswarapu --- plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml') diff --git a/plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml b/plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml index 017f377e..501d3baa 100644 --- a/plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml +++ b/plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml @@ -48,13 +48,22 @@ ignore_errors: "true" register: osdsctl_exists -- name: create opensds default profile +- name: ensure opensds csi directory exists + stat: + path: /opt/opensds-sushi-linux-{{ imgarch }} + ignore_errors: "true" + register: csi_dir_exists + +- name: create opensds default profile, create csi pods remote_user: root shell: | cp /opt/opensds-hotpot-linux-{{ imgarch }}/bin/osdsctl /usr/local/bin; export OPENSDS_ENDPOINT=http://{{ public_vip.ip }}:50040; export OPENSDS_AUTH_STRATEGY=noauth; - osdsctl profile create '{"name": "default", "description": "default policy"}' + osdsctl profile create '{"name": "default", "description": "default policy"}'; + cd /opt/opensds-sushi-linux-{{ imgarch }}; + kubectl create -f csi/deploy/kubernetes ignore_errors: "true" when: - osdsctl_exists.stat.exists is defined and osdsctl_exists.stat.exists + - csi_dir_exists.stat.exists is defined and csi_dir_exists.stat.exists -- cgit 1.2.3-korg