From 79b191d207d7670295781c550847ce7d695cc388 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Wed, 7 Aug 2019 18:47:39 +0200 Subject: Support for Samba/CIFS storage and a sample how to mount LSDF shares --- playbooks/openshift-install-cifs.yml | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 playbooks/openshift-install-cifs.yml (limited to 'playbooks/openshift-install-cifs.yml') diff --git a/playbooks/openshift-install-cifs.yml b/playbooks/openshift-install-cifs.yml new file mode 100644 index 0000000..92ed09c --- /dev/null +++ b/playbooks/openshift-install-cifs.yml @@ -0,0 +1,40 @@ +--- + +- hosts: nodes + serial: 1 + vars: + vendor_name: openshift.io + driver_name: cifs + driver_location: "{{ playbook_dir }}/../anslib/openshift-flexvolume-cifs/flexvolume-driver/cifs" + volume_plugin_path: "/usr/libexec/kubernetes/kubelet-plugins/volume/exec" + openshift_node_service: origin-node + install_packages: + - cifs-utils + tasks: + - name: Install required packages + package: + name: "{{ install_packages }}" + state: present + - name: Validate driver exists + stat: + path: "{{ driver_location }}" + register: driver_exists + delegate_to: localhost + - name: Fail if driver not found + fail: + msg: Driver file not found! + when: not driver_exists.stat.exists + - name: Create cifs driver directory + file: + state: directory + path: "{{ volume_plugin_path }}/{{ vendor_name }}~{{ driver_name }}" + - name: Copy cifs driver + copy: + src: "{{ driver_location }}" + dest: "{{ volume_plugin_path }}/{{ vendor_name }}~{{ driver_name }}/{{ driver_name }}" + mode: 0755 + register: driver_copy + - name: Restart OpenShift Node Service + service: + name: "{{ openshift_node_service }}" + state: restarted \ No newline at end of file -- cgit v1.2.3