diff options
author | Mangirdas <m.judeikis@gmail.com> | 2018-01-30 12:18:19 +0000 |
---|---|---|
committer | Mangirdas <m.judeikis@gmail.com> | 2018-01-31 11:19:46 +0000 |
commit | 2573825c06e9d3a5601b6c1492f71fd0b70b2578 (patch) | |
tree | 570966c8f5ce051c7388619be67a249b77eac427 /roles/openshift_node | |
parent | 844156f49a1899dd9d6059207bf63e6d8b865ec6 (diff) | |
download | openshift-2573825c06e9d3a5601b6c1492f71fd0b70b2578.tar.gz openshift-2573825c06e9d3a5601b6c1492f71fd0b70b2578.tar.bz2 openshift-2573825c06e9d3a5601b6c1492f71fd0b70b2578.tar.xz openshift-2573825c06e9d3a5601b6c1492f71fd0b70b2578.zip |
add glusterblock support for ansible
Co-authored-by: Christina Kyriakidou <Ckyriaki@Redhat.com>
Diffstat (limited to 'roles/openshift_node')
-rw-r--r-- | roles/openshift_node/defaults/main.yml | 1 | ||||
-rw-r--r-- | roles/openshift_node/tasks/storage_plugins/iscsi.yml | 28 | ||||
-rw-r--r-- | roles/openshift_node/templates/multipath.conf.j2 | 15 |
3 files changed, 43 insertions, 1 deletions
diff --git a/roles/openshift_node/defaults/main.yml b/roles/openshift_node/defaults/main.yml index 0fe4c2035..9f887891b 100644 --- a/roles/openshift_node/defaults/main.yml +++ b/roles/openshift_node/defaults/main.yml @@ -137,6 +137,7 @@ default_r_openshift_node_image_prep_packages: - yum-utils # gluster - glusterfs-fuse +- device-mapper-multipath # nfs - nfs-utils - flannel diff --git a/roles/openshift_node/tasks/storage_plugins/iscsi.yml b/roles/openshift_node/tasks/storage_plugins/iscsi.yml index a8048c42f..72415f9a6 100644 --- a/roles/openshift_node/tasks/storage_plugins/iscsi.yml +++ b/roles/openshift_node/tasks/storage_plugins/iscsi.yml @@ -1,6 +1,32 @@ --- - name: Install iSCSI storage plugin dependencies - package: name=iscsi-initiator-utils state=present + package: + name: "{{ item }}" + state: present when: not openshift_is_atomic | bool register: result until: result is succeeded + with_items: + - iscsi-initiator-utils + - device-mapper-multipath + +- name: restart services + systemd: + name: "{{ item }}" + state: started + enabled: True + 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 diff --git a/roles/openshift_node/templates/multipath.conf.j2 b/roles/openshift_node/templates/multipath.conf.j2 new file mode 100644 index 000000000..8a0abc2c1 --- /dev/null +++ b/roles/openshift_node/templates/multipath.conf.j2 @@ -0,0 +1,15 @@ +# LIO iSCSI +# TODO: Add env variables for tweaking +devices { + device { + vendor "LIO-ORG" + user_friendly_names "yes" + path_grouping_policy "failover" + path_selector "round-robin 0" + failback immediate + path_checker "tur" + prio "const" + no_path_retry 120 + rr_weight "uniform" + } +} |