summaryrefslogtreecommitdiffstats
path: root/roles/openshift_node/tasks/storage_plugins/iscsi.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_node/tasks/storage_plugins/iscsi.yml')
-rw-r--r--roles/openshift_node/tasks/storage_plugins/iscsi.yml33
1 files changed, 30 insertions, 3 deletions
diff --git a/roles/openshift_node/tasks/storage_plugins/iscsi.yml b/roles/openshift_node/tasks/storage_plugins/iscsi.yml
index ece68dc71..e31433dbc 100644
--- a/roles/openshift_node/tasks/storage_plugins/iscsi.yml
+++ b/roles/openshift_node/tasks/storage_plugins/iscsi.yml
@@ -1,6 +1,33 @@
---
- name: Install iSCSI storage plugin dependencies
- package: name=iscsi-initiator-utils state=present
- when: not openshift.common.is_atomic | bool
+ package:
+ name: "{{ item }}"
+ state: present
+ when: not openshift_is_atomic | bool
register: result
- until: result | success
+ until: result is succeeded
+ with_items:
+ - iscsi-initiator-utils
+ - device-mapper-multipath
+
+- name: restart services
+ systemd:
+ name: "{{ item }}"
+ state: started
+ enabled: True
+ when: not openshift_is_atomic | bool
+ with_items:
+ - multipathd
+ - rpcbind
+
+- name: Template multipath configuration
+ template:
+ dest: "/etc/multipath.conf"
+ src: multipath.conf.j2
+ backup: true
+ when: not openshift_is_atomic | bool
+
+#enable multipath
+- name: Enable multipath
+ command: "mpathconf --enable"
+ when: not openshift_is_atomic | bool