aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/stor4nfv/roles/stor4nfv/tasks
diff options
context:
space:
mode:
authorHarry Huang <huangxiangyu5@huawei.com>2018-09-12 06:20:56 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-09-12 06:20:56 +0000
commit3c6c6c0742b7124fd5d1e84e975e6d0d6bff434e (patch)
treef502ee8853522f06d5dde357bd43dcf06937ed8b /plugins/stor4nfv/roles/stor4nfv/tasks
parenta4a53a8296744f52164a2808b4c5933f02b4947c (diff)
parent05b4327fd431dab374bad27ab4cb5069a31b8dc2 (diff)
Merge "[stor4nfv] Update k8s scenarios"
Diffstat (limited to 'plugins/stor4nfv/roles/stor4nfv/tasks')
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/tasks/main.yml2
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml13
2 files changed, 12 insertions, 3 deletions
diff --git a/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml b/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml
index 7bc8ec06..dbaa8d6b 100644
--- a/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml
+++ b/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml
@@ -7,7 +7,7 @@
# http://www.apache.org/licenses/LICENSE-2.0
# #############################################################################
---
-- include: stor4nfv
+- include: stor4nfv.yml
when:
- ansible_distribution == 'Ubuntu'
- stor4nfv is defined and stor4nfv == "Enable"
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