Commit 33db1422 authored by Simon Michnowicz's avatar Simon Michnowicz
Browse files

Merge branch 'master' into 'master'

added conditionals to prevent installation if drivers already present (Note, tested only on redhat)

See merge request !4
parents 3c58d37d d4e40837
......@@ -8,11 +8,17 @@
ignore_errors: true
when: ansible_os_family == "RedHat"
- name: test for existing installation of drivers
command: ibv_devinfo
sudo: true
register: drivers_installed
ignore_errors: true
- name: yum update to upgrade kernel
shell: "yum update -y"
sudo: true
ignore_errors: true
when: ansible_os_family == "RedHat"
when: ansible_os_family == "RedHat" and drivers_installed|failed
#
# A REBOOT IS NEEDED AFTER a KERNEL UPDATE
......@@ -23,10 +29,9 @@
poll: 0
ignore_errors: true
sudo: true
when: ansible_os_family == "RedHat"
when: ansible_os_family == "RedHat" and drivers_installed|failed
- name: waiting for server to come back
#local_action: wait_for host={{ ansible_host }} state=started port=22 delay=10 search_regex=OpenSSH
local_action: wait_for host={{ ansible_ssh_host }} state=started port=22 delay=10 search_regex=OpenSSH
sudo: false
......@@ -34,11 +39,6 @@
local_action: wait_for host={{ ansible_ssh_host }} state=started port=22 delay=10 search_regex=OpenSSH
sudo: false
- name: test for existing installation of drivers
command: ibv_devinfo
sudo: true
register: drivers_installed
ignore_errors: true
- name: copy driver source
#make this a variable
......@@ -62,12 +62,14 @@
local_action: command ./scripts/map_ib_ip.pl {{ inventory_hostname }}
register: ip_address
sudo: false
#when: drivers_installed|failed
- name: template IP address
template: dest=/etc/sysconfig/network-scripts/ifcfg-ens6 src=ifcfg-ens6.j2 owner=root group=root
sudo: true
when: ansible_os_family=="RedHat" and ansible_distribution_major_version == "7"
when: ansible_os_family=="RedHat" and ansible_distribution_major_version == "7" and drivers_installed|failed
#ubuntu equivalent of previous command
- name: Ubuntu network interfaces - line 1
lineinfile:
......@@ -76,7 +78,8 @@
line: auto {{ MELLANOX_DEVICE_NAME }}
state: present
sudo: true
when: ansible_os_family=="Debian"
when: ansible_os_family=="Debian" and drivers_installed|failed
- name: Ubuntu network interfaces - line 2
lineinfile:
args:
......@@ -85,7 +88,7 @@
state: present
insertafter: "auto {{ MELLANOX_DEVICE_NAME }}"
sudo: true
when: ansible_os_family=="Debian"
when: ansible_os_family=="Debian" and drivers_installed|failed
- name: Ubuntu network interfaces - line 3
lineinfile:
args:
......@@ -94,7 +97,7 @@
state: present
insertafter: "iface {{ MELLANOX_DEVICE_NAME }} inet static"
sudo: true
when: ansible_os_family=="Debian"
when: ansible_os_family=="Debian" and drivers_installed|failed
#
# A REBOOT IS NEEDED AFTER SUCCESSFUL INSTALL
#
......@@ -104,12 +107,12 @@
poll: 0
ignore_errors: true
sudo: true
when: ansible_os_family=="Centos"
when: ansible_os_family=="Centos" and drivers_installed|failed
- name: restart machine for Ubuntu -cos it is 'special'
command: "sudo shutdown -r now"
shell: "sleep 5; sudo shutdown -r now"
async: 2
poll: 0
poll: 1
ignore_errors: true
sudo: true
when: ansible_os_family=="Debian"
......
#!/bin/sh
find /tmp -user ${SLURM_JOB_USER} | xargs rm -rf
# specific files to be deleted to clean up after a Strudel session
find /tmp -user ${SLURM_JOB_USER} -name "pulse*" | xargs rm -rf
find /tmp -user ${SLURM_JOB_USER} -name ".esd-*" | xargs rm -rf
find /tmp -user ${SLURM_JOB_USER} -name ".X*-lock" | xargs rm -rf
find /tmp/.X11-unix -user ${SLURM_JOB_USER} -name "X*" | xargs rm -rf
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment