aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/stor4nfv
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/stor4nfv')
-rw-r--r--plugins/stor4nfv/plugin.desc4
-rw-r--r--plugins/stor4nfv/roles/os-stor4nfv/files/install_ansible.sh18
-rw-r--r--plugins/stor4nfv/roles/os-stor4nfv/files/os_configure_vars.sh28
-rw-r--r--plugins/stor4nfv/roles/os-stor4nfv/tasks/main.yml13
-rw-r--r--plugins/stor4nfv/roles/os-stor4nfv/tasks/opensds.yml72
-rw-r--r--plugins/stor4nfv/roles/os-stor4nfv/tasks/post-install.yml143
-rw-r--r--plugins/stor4nfv/roles/os-stor4nfv/tasks/stor4nfv.yml14
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/files/configure_vars.sh23
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/files/install_ansible.sh2
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/tasks/main.yml2
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/tasks/opensds.yml14
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml69
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/tasks/stor4nfv.yml12
-rw-r--r--plugins/stor4nfv/roles/stor4nfv/templates/post-install.yml.j220
14 files changed, 414 insertions, 20 deletions
diff --git a/plugins/stor4nfv/plugin.desc b/plugins/stor4nfv/plugin.desc
index ae589a60..e0a1e690 100644
--- a/plugins/stor4nfv/plugin.desc
+++ b/plugins/stor4nfv/plugin.desc
@@ -43,3 +43,7 @@ plugin:
phrase: post_k8s
inventory:
- localhost
+ - role: os-stor4nfv
+ phrase: post_openstack
+ inventory:
+ - localhost
diff --git a/plugins/stor4nfv/roles/os-stor4nfv/files/install_ansible.sh b/plugins/stor4nfv/roles/os-stor4nfv/files/install_ansible.sh
new file mode 100644
index 00000000..d921d4e2
--- /dev/null
+++ b/plugins/stor4nfv/roles/os-stor4nfv/files/install_ansible.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+
+add-apt-repository ppa:ansible/ansible-2.4
+
+apt-get update
+apt-get install -y ansible
+sleep 5
+
+ansible --version
+
diff --git a/plugins/stor4nfv/roles/os-stor4nfv/files/os_configure_vars.sh b/plugins/stor4nfv/roles/os-stor4nfv/files/os_configure_vars.sh
new file mode 100644
index 00000000..a081c0bd
--- /dev/null
+++ b/plugins/stor4nfv/roles/os-stor4nfv/files/os_configure_vars.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+
+cd $HOME/gopath/src/github.com/os-stor4nfv/stor4nfv/ci/ansible
+
+sed -i '/- osdsdock/s/^/#/g' site.yml
+
+sed -i '/- dashboard-installer/s/^/#/g' site.yml
+
+sed -i '/- nbp-installer/s/^/#/g' site.yml
+
+sed -i '/check_ansible_version/a \ ignore_errors: yes\' roles/common/tasks/main.yml
+
+# auth
+sed -i 's/^opensds_auth_strategy.*/opensds_auth_strategy: noauth/g' group_vars/auth.yml
+
+# opensds_endpoint
+sed -i 's/^opensds_endpoint.*/opensds_endpoint: http:\/\/'"$1"':50040/g' group_vars/common.yml
+
+# etcd_host
+sed -i 's/^etcd_host.*/etcd_host: '"$2"'/g' group_vars/osdsdb.yml
diff --git a/plugins/stor4nfv/roles/os-stor4nfv/tasks/main.yml b/plugins/stor4nfv/roles/os-stor4nfv/tasks/main.yml
new file mode 100644
index 00000000..dbaa8d6b
--- /dev/null
+++ b/plugins/stor4nfv/roles/os-stor4nfv/tasks/main.yml
@@ -0,0 +1,13 @@
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+---
+- include: stor4nfv.yml
+ when:
+ - ansible_distribution == 'Ubuntu'
+ - stor4nfv is defined and stor4nfv == "Enable"
diff --git a/plugins/stor4nfv/roles/os-stor4nfv/tasks/opensds.yml b/plugins/stor4nfv/roles/os-stor4nfv/tasks/opensds.yml
new file mode 100644
index 00000000..fd9756a4
--- /dev/null
+++ b/plugins/stor4nfv/roles/os-stor4nfv/tasks/opensds.yml
@@ -0,0 +1,72 @@
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+---
+
+- name: install prerequisites package
+ apt:
+ name: "{{ item }}"
+ state: present
+ with_items:
+ - git
+ - gawk
+ - curl
+ - wget
+ - software-properties-common
+
+- name: copy install_ansible script
+ remote_user: root
+ copy:
+ src: install_ansible.sh
+ dest: /opt/install_ansible.sh
+ mode: 0777
+
+- name: install ansible
+ command: su -s /bin/sh -c "/opt/install_ansible.sh"
+ ignore_errors: "true"
+
+- name: disable cinder
+ remote_user: root
+ shell: |
+ lxc-stop -n $(lxc-ls --line | grep cinder_api)
+ lxc-stop -n $(lxc-ls --line | grep cinder_scheduler)
+ ignore_errors: "true"
+
+- name: modify haproxy.cfg and restart haproxy
+ remote_user: root
+ shell: |
+ sed -i \
+ '/frontend cinder_api-front/,/host1_cinder_api_container/ s/^/#/' /etc/haproxy/haproxy.cfg
+ systemctl restart haproxy
+ ignore_errors: "true"
+
+- name: fetch stor4nfv source code
+ remote_user: root
+ shell: |
+ mkdir -p $HOME/gopath/src/github.com/os-stor4nfv && cd $HOME/gopath/src/github.com/os-stor4nfv;
+ rm -rf stor4nfv;
+ git clone https://gerrit.opnfv.org/gerrit/stor4nfv.git
+
+- name: copy os_configure_vars script
+ remote_user: root
+ copy:
+ src: os_configure_vars.sh
+ dest: /opt/os_configure_vars.sh
+ mode: 0777
+
+- name: configure variables for opensds
+ remote_user: root
+ shell: |
+ cd /opt;
+ ./os_configure_vars.sh {{ public_vip.ip }} {{ internal_vip.ip }}
+
+- name: run playbook
+ remote_user: root
+ shell: |
+ cd $HOME/gopath/src/github.com/os-stor4nfv/stor4nfv/ci/ansible;
+ ansible-playbook site.yml -i local.hosts | tee /var/log/os-stor4nfv.log
diff --git a/plugins/stor4nfv/roles/os-stor4nfv/tasks/post-install.yml b/plugins/stor4nfv/roles/os-stor4nfv/tasks/post-install.yml
new file mode 100644
index 00000000..d441f420
--- /dev/null
+++ b/plugins/stor4nfv/roles/os-stor4nfv/tasks/post-install.yml
@@ -0,0 +1,143 @@
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+---
+
+- name: ensure opensds.conf exists
+ stat:
+ path: /etc/opensds/opensds.conf
+ register: opensds_exists
+ when:
+ - inventory_hostname in groups['ceph_adm']
+
+- name: configure ceph.yaml, opensds.conf
+ remote_user: root
+ shell: |
+ cd /root/gopath/src/github.com/os-stor4nfv/stor4nfv/ci/ansible
+ cp group_vars/ceph/ceph.yaml /etc/opensds/driver/
+ sed -i 's/^ enabled_backends.*/ enabled_backends: ceph/g' /etc/opensds/opensds.conf
+ sudo cat >> /etc/opensds/opensds.conf << OPENSDS_GLOABL_CONFIG_DOC
+
+ [ceph]
+ name = ceph
+ description = Ceph Test
+ driver_name = ceph
+ config_path = /etc/opensds/driver/ceph.yaml
+ OPENSDS_GLOABL_CONFIG_DOC
+ when:
+ - inventory_hostname in groups['ceph_adm']
+
+- name: modify osdsdock endpoint
+ remote_user: root
+ shell:
+ _raw_params: |
+ function _modify_osdsdock_endpoint {
+ local ip_addr=$((lxc-info -n $(lxc-ls --line | grep ceph-mon) -iH)|grep "10.1")
+ if [ ! -z "${ip_addr}" ]; then
+ sed -i 's/api_endpoint = localhost:50050/api_endpoint = '"$ip_addr"':50050/g' \
+ /etc/opensds/opensds.conf
+ fi
+ }
+ _modify_osdsdock_endpoint
+ args:
+ executable: /bin/bash
+ become: true
+ when:
+ - inventory_hostname in groups['ceph_adm']
+
+- name: copy ceph.conf from ceph-mon container
+ remote_user: root
+ shell: |
+ mkdir -p /etc/ceph;
+ cp /proc/$(lxc-info -n $(lxc-ls --line | grep ceph-mon) -p -H)/root/etc/ceph/ceph.conf \
+ /etc/ceph/ceph.conf
+ when:
+ - inventory_hostname in groups['ceph_adm']
+
+- name: copy osdsdock executable to ceph-mon container
+ remote_user: root
+ shell: |
+ cd /opt;
+ tar -C opensds-hotpot-linux-amd64 -c . | lxc-attach -n \
+ $(lxc-ls --line | grep ceph-mon) -- /bin/sh -c "tar -C /opt/ -vx; chmod 1777 /opt;"
+ when:
+ - inventory_hostname in groups['ceph_adm']
+
+- name: copy opensds conf files to ceph-mon container
+ remote_user: root
+ shell: |
+ cd /etc;
+ tar -C opensds -c . | lxc-attach -n \
+ $(lxc-ls --line | grep ceph-mon) -- /bin/sh -c "tar -C /tmp/ -vx; chmod 1777 /tmp;"
+ when:
+ - inventory_hostname in groups['ceph_adm']
+
+- name: ensure opensds driver exists
+ stat:
+ path: /tmp/driver
+ register: opensds_driver_exists
+ when:
+ - inventory_hostname in groups['ceph-mon']
+ - groups['ceph_adm'][0] in inventory_hostname
+
+- name: copy opensds conf
+ remote_user: root
+ shell: |
+ mkdir -p /etc/opensds;
+ cp /tmp/opensds.conf /etc/opensds;
+ cp /tmp/policy.json /etc/opensds;
+ cp -r /tmp/driver /etc/opensds;
+ when:
+ - inventory_hostname in groups['ceph-mon']
+ - groups['ceph_adm'][0] in inventory_hostname
+
+- name: create ceph pool
+ remote_user: root
+ shell: |
+ ceph osd pool create rbd 24 && ceph osd pool set rbd size 1
+ when:
+ - inventory_hostname in groups['ceph-mon']
+ - groups['ceph_adm'][0] in inventory_hostname
+
+- name: ensure osdsdock exists
+ stat:
+ path: /opt/bin/osdsdock
+ register: opensds_exists
+ when:
+ - inventory_hostname in groups['ceph-mon']
+ - groups['ceph_adm'][0] in inventory_hostname
+
+- name: start osdsdock daemon
+ remote_user: root
+ shell: |
+ cd /opt && ./bin/osdsdock -daemon
+ when:
+ - inventory_hostname in groups['ceph-mon']
+ - groups['ceph_adm'][0] in inventory_hostname
+
+- name: ensure osdsctl exists
+ stat:
+ path: /opt/opensds-hotpot-linux-amd64/bin/osdsctl
+ register: osdsctl_exists
+ when:
+ - inventory_hostname in groups['ceph_adm']
+
+- name: run cinder-compatible-api, create opensds default profile
+ remote_user: root
+ shell: |
+ cd $HOME/gopath/src/github.com/os-stor4nfv/stor4nfv/ci/ansible;
+ export OPENSDS_ENDPOINT=http://{{ public_vip.ip }}:50040;
+ export CINDER_ENDPOINT=http://{{ internal_vip.ip }}:8776/v3;
+ chmod +x ../bin/cindercompatibleapi;
+ ( ( nohup ../bin/cindercompatibleapi > /var/log/cindercompatibleapi.log 2>&1 ) & );
+ cp /opt/opensds-hotpot-linux-amd64/bin/osdsctl /usr/local/bin;
+ export OPENSDS_AUTH_STRATEGY=noauth;
+ osdsctl profile create '{"name": "default", "description": "default policy"}'
+ when:
+ - inventory_hostname in groups['ceph_adm']
+ ignore_errors: "true"
diff --git a/plugins/stor4nfv/roles/os-stor4nfv/tasks/stor4nfv.yml b/plugins/stor4nfv/roles/os-stor4nfv/tasks/stor4nfv.yml
new file mode 100644
index 00000000..05ada67a
--- /dev/null
+++ b/plugins/stor4nfv/roles/os-stor4nfv/tasks/stor4nfv.yml
@@ -0,0 +1,14 @@
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+---
+- include: opensds.yml
+ when:
+ - inventory_hostname in groups['ceph_adm']
+
+- include: post-install.yml
diff --git a/plugins/stor4nfv/roles/stor4nfv/files/configure_vars.sh b/plugins/stor4nfv/roles/stor4nfv/files/configure_vars.sh
index a4fe44ea..89432135 100644
--- a/plugins/stor4nfv/roles/stor4nfv/files/configure_vars.sh
+++ b/plugins/stor4nfv/roles/stor4nfv/files/configure_vars.sh
@@ -10,10 +10,6 @@
cd $HOME/gopath/src/github.com/stor4nfv/stor4nfv/ci/ansible
-sed -i 's/^opensds_release.*/opensds_release: v0.1.5/g' group_vars/common.yml
-
-sed -i 's/^nbp_release.*/nbp_release: v0.1.0/g' group_vars/common.yml
-
sed -i 's/^container_enabled.*/container_enabled: false/g' group_vars/common.yml
sed -i 's/^nbp_plugin_type.*/nbp_plugin_type: csi/g' group_vars/common.yml
@@ -34,7 +30,9 @@ sed -i 's|^cluster_network.*|cluster_network: '"$2"'|g' group_vars/ceph/all.yml
sed -i 's/^monitor_interface.*/monitor_interface: eth0/g' group_vars/ceph/all.yml
-sed -i 's/^devices:.*/devices: [\/dev\/loop0, \/dev\/loop1, \/dev\/loop2]/g' group_vars/ceph/osds.yml
+sed -i 's/^devices:.*/devices: [\/dev\/loop0, \/dev\/loop1, \/dev\/loop2]/g' group_vars/ceph/all.yml
+
+sed -i '/dev\/sda/s/^/#/g' group_vars/ceph/all.yml
sed -i 's/^osd_scenario.*/osd_scenario: collocated/g' group_vars/ceph/osds.yml
@@ -45,3 +43,18 @@ sed -i 's/^etcd_host.*/etcd_host: 127.0.0.1/g' group_vars/osdsdb.yml
sed -i 's/^etcd_port.*/etcd_port: 62379/g' group_vars/osdsdb.yml
sed -i 's/^etcd_peer_port.*/etcd_peer_port: 62380/g' group_vars/osdsdb.yml
+
+sed -i 's/^opensds_auth_strategy.*/opensds_auth_strategy: noauth/g' group_vars/auth.yml
+
+sed -i '/check_ansible_version/a \ ignore_errors: yes\' roles/common/tasks/main.yml
+
+sed -i '/- dashboard-installer/s/^/#/g' site.yml
+
+# comment csi create pods in Stor4nfv
+sed -i '/kubectl create/s/^/#/g' roles/nbp-installer/scenarios/csi.yml
+
+sed -i 's/^opensds_endpoint.*/opensds_endpoint: http:\/\/'"$1"':50040/g' group_vars/common.yml
+
+sed -i '/and service_ceph_osd_status.rc == 0/s/^/#/g' roles/osdsdock/scenarios/ceph.yml
+sed -i '/and service_ceph_osd_status.rc == 0/a \ when: service_ceph_mon_status.rc == 0\' \
+ roles/osdsdock/scenarios/ceph.yml
diff --git a/plugins/stor4nfv/roles/stor4nfv/files/install_ansible.sh b/plugins/stor4nfv/roles/stor4nfv/files/install_ansible.sh
index b4a3a30a..d921d4e2 100644
--- a/plugins/stor4nfv/roles/stor4nfv/files/install_ansible.sh
+++ b/plugins/stor4nfv/roles/stor4nfv/files/install_ansible.sh
@@ -8,7 +8,7 @@
# http://www.apache.org/licenses/LICENSE-2.0
# #############################################################################
-add-apt-repository ppa:ansible/ansible
+add-apt-repository ppa:ansible/ansible-2.4
apt-get update
apt-get install -y ansible
diff --git a/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml b/plugins/stor4nfv/roles/stor4nfv/tasks/main.yml
index 353282f9..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: opensds.yml
+- include: stor4nfv.yml
when:
- ansible_distribution == 'Ubuntu'
- stor4nfv is defined and stor4nfv == "Enable"
diff --git a/plugins/stor4nfv/roles/stor4nfv/tasks/opensds.yml b/plugins/stor4nfv/roles/stor4nfv/tasks/opensds.yml
index 7866e808..e84ce0aa 100644
--- a/plugins/stor4nfv/roles/stor4nfv/tasks/opensds.yml
+++ b/plugins/stor4nfv/roles/stor4nfv/tasks/opensds.yml
@@ -15,6 +15,7 @@
with_items:
- make
- gcc
+ - gawk
- name: copy install_ansible script
remote_user: root
@@ -26,12 +27,6 @@
- name: install ansible
command: su -s /bin/sh -c "/opt/install_ansible.sh"
-- name: install ceph-ansible code
- remote_user: root
- shell: |
- cd /opt;
- git clone https://github.com/ceph/ceph-ansible.git
-
- name: fetch stor4nfv source code
remote_user: root
shell: |
@@ -75,10 +70,3 @@
shell: |
cd $HOME/gopath/src/github.com/stor4nfv/stor4nfv/ci/ansible;
ansible-playbook site.yml -i local.hosts | tee /var/log/stor4nfv.log
- register: stor4nfv_result
-
-- name: export opensds endpoint
- remote_user: root
- shell: |
- export OPENSDS_ENDPOINT=http://127.0.0.1:50040
- when: stor4nfv_result|succeeded
diff --git a/plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml b/plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml
new file mode 100644
index 00000000..501d3baa
--- /dev/null
+++ b/plugins/stor4nfv/roles/stor4nfv/tasks/post-install.yml
@@ -0,0 +1,69 @@
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+---
+
+- name: define image architecture
+ set_fact:
+ imgarch: "{{ 'arm64' if ansible_architecture == 'aarch64' else 'amd64' }}"
+
+- name: ensure ceph-ansible dir exists
+ stat:
+ path: /opt/ceph-ansible
+ ignore_errors: "true"
+ register: ceph_ansible_exists
+
+- name: copy post-install.yml to /opt/ceph-ansible
+ remote_user: root
+ template:
+ src: post-install.yml.j2
+ dest: /opt/ceph-ansible/post-install.yml
+ when:
+ - ceph_ansible_exists.stat.exists is defined and ceph_ansible_exists.stat.exists
+
+- name: run post-install playbook
+ shell: ansible-playbook post-install.yml -i ceph.hosts
+ become: true
+ args:
+ chdir: /opt/ceph-ansible
+ ignore_errors: "true"
+ when:
+ - ceph_ansible_exists.stat.exists is defined and ceph_ansible_exists.stat.exists
+
+- name: remove post-install.yml
+ file:
+ path: /opt/ceph-ansible/post-install.yml
+ state: absent
+ when:
+ - ceph_ansible_exists.stat.exists is defined and ceph_ansible_exists.stat.exists
+
+- name: ensure osdsctl exists
+ stat:
+ path: /opt/opensds-hotpot-linux-{{ imgarch }}/bin/osdsctl
+ ignore_errors: "true"
+ register: osdsctl_exists
+
+- 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"}';
+ 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
diff --git a/plugins/stor4nfv/roles/stor4nfv/tasks/stor4nfv.yml b/plugins/stor4nfv/roles/stor4nfv/tasks/stor4nfv.yml
new file mode 100644
index 00000000..57bae793
--- /dev/null
+++ b/plugins/stor4nfv/roles/stor4nfv/tasks/stor4nfv.yml
@@ -0,0 +1,12 @@
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+---
+- include: opensds.yml
+
+- include: post-install.yml
diff --git a/plugins/stor4nfv/roles/stor4nfv/templates/post-install.yml.j2 b/plugins/stor4nfv/roles/stor4nfv/templates/post-install.yml.j2
new file mode 100644
index 00000000..662abc34
--- /dev/null
+++ b/plugins/stor4nfv/roles/stor4nfv/templates/post-install.yml.j2
@@ -0,0 +1,20 @@
+# #############################################################################
+# Copyright (c) 2018 Intel Corp.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+# #############################################################################
+---
+
+- hosts:
+ - mons
+ - osds
+ - mgrs
+
+ tasks:
+ - name: run modprobe rbd
+ remote_user: root
+ command: modprobe rbd
+ ignore_errors: "true"