summaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-08-07 18:47:39 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-08-07 18:47:39 +0200
commit79b191d207d7670295781c550847ce7d695cc388 (patch)
tree2b6fb60e40ab98b68d1bce6f8e96a528e99df265 /playbooks
parent9481fe4541a4f0abab6a4e76931a3d6bd9a5b8b0 (diff)
downloadands-79b191d207d7670295781c550847ce7d695cc388.tar.gz
ands-79b191d207d7670295781c550847ce7d695cc388.tar.bz2
ands-79b191d207d7670295781c550847ce7d695cc388.tar.xz
ands-79b191d207d7670295781c550847ce7d695cc388.zip
Support for Samba/CIFS storage and a sample how to mount LSDF shares
Diffstat (limited to 'playbooks')
-rw-r--r--playbooks/openshift-install-cifs.yml40
1 files changed, 40 insertions, 0 deletions
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