From c845c7522dffcb0c389f12517777f98383a8c039 Mon Sep 17 00:00:00 2001
From: Chris Hines <chris.hines@monash.edu>
Date: Tue, 10 Nov 2015 16:41:44 +1100
Subject: [PATCH] lustre-client role for Ubuntu (also need the lustre packages
 stored separatly)

---
 roles/lustre-client/tasks/main.yml      | 30 +++++++++++++++++++++++--
 roles/lustre-client/vars/Ubuntu_14.yaml |  5 +++++
 2 files changed, 33 insertions(+), 2 deletions(-)
 create mode 100644 roles/lustre-client/vars/Ubuntu_14.yaml

diff --git a/roles/lustre-client/tasks/main.yml b/roles/lustre-client/tasks/main.yml
index 0b2e2be..41d03b0 100644
--- a/roles/lustre-client/tasks/main.yml
+++ b/roles/lustre-client/tasks/main.yml
@@ -1,11 +1,12 @@
 ---
 - include_vars: "{{ ansible_distribution }}_{{ ansible_distribution_major_version }}.yaml"
 
-- name: copy rpms
+- name: copy rpms/debs
   copy: dest=/tmp/ src=lustre-install/{{ item }}
   with_items:
     "{{ lustre_pkgs }}"
 
+
 #- name: install rpms
 #  yum: name="/tmp/{{ item }}"
 #  sudo: true
@@ -14,13 +15,38 @@
 - name: install rpms
   yum: name=/tmp/lustre-client-modules-2.7.0-3.10.0_229.14.1.el7.x86_64.x86_64.rpm
   sudo: true
+  when: ansible_os_family == "RedHat"
 
 - name: install rpms
   yum: name=/tmp/lustre-client-2.7.0-3.10.0_229.14.1.el7.x86_64.x86_64.rpm
   sudo: true
+  when: ansible_os_family == "RedHat"
+
+# instructions to build these debs:
+# Instantiate an Ubuntu 14.04 instance
+# git clone git://git.hpdd.intel.com/fs/lustre-release.git
+# cd lustre-release
+# optionally git checkout 0754bc8f2623bea184111af216f7567608db35b6 <- I know this commit works on Ubuntu, but I had a lot of trouble with other branches
+# sh autogen.sh
+# ./configure --enable-dist --disable-doc  --disable-server --disable-dependency-tracking --with-o2ib=/var/lib/dkms/mlnx-ofed-kernel/3.1/build/
+# mkdir BUILD
+# cd BUILD
+# ln -s ../lustre-2.7.62.tar.gz lustre-2.7.62.orig.tar.gz
+# tar zxvf ../lustre-2.7.62.tar.gz
+# cd lustre-2.7.62
+# ./configure --disable-doc  --disable-server --disable-dependency-tracking --with-o2ib=/var/lib/dkms/mlnx-ofed-kernel/3.1/build/
+# vi debian/changelog (the version number on the first line is incorrect)
+# make debs
+#
+- name: install debs
+  apt: name="/tmp/{{ item }}"
+  sudo: true
+  with_items: "{{ lustre_pkgs }}"
+  when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "14"
 
-  
 - name: "Mount lustre filesystems"
   mount: name="{{ item.mntpt }}" src="{{ item.servers }}"/"{{ item.src }}" state="mounted" fstype="lustre" opts="_netdev,flock" 
   sudo: true
   with_items: "{{ mntlist }}"
+
+
diff --git a/roles/lustre-client/vars/Ubuntu_14.yaml b/roles/lustre-client/vars/Ubuntu_14.yaml
new file mode 100644
index 0000000..8e3870d
--- /dev/null
+++ b/roles/lustre-client/vars/Ubuntu_14.yaml
@@ -0,0 +1,5 @@
+---
+lustre_pkgs:
+  - linux-patch-lustre_2.7.62-1_all.deb
+  - lustre-client-modules-3.13.0-58-generic_2.7.62-1_amd64.deb
+  - lustre-utils_2.7.62-1_amd64.deb
-- 
GitLab