summaryrefslogtreecommitdiff
path: root/openstack/usr/share/openstack/cinder-iscsi.yml
diff options
context:
space:
mode:
Diffstat (limited to 'openstack/usr/share/openstack/cinder-iscsi.yml')
-rw-r--r--openstack/usr/share/openstack/cinder-iscsi.yml15
1 files changed, 15 insertions, 0 deletions
diff --git a/openstack/usr/share/openstack/cinder-iscsi.yml b/openstack/usr/share/openstack/cinder-iscsi.yml
new file mode 100644
index 0000000..b80377a
--- /dev/null
+++ b/openstack/usr/share/openstack/cinder-iscsi.yml
@@ -0,0 +1,15 @@
+---
+- hosts: localhost
+ tasks:
+ - name: Update kernel module dependencies
+ command: depmod -a
+
+ - name: generate InitiatorName for iscsi
+ shell: iscsi-iname
+ register: initiator_name
+
+ - lineinfile:
+ dest: /etc/iscsi/initiatorname.iscsi
+ regexp: '^InitiatorName=$'
+ line: 'InitiatorName={{ initiator_name.stdout }}'
+ backrefs: yes