Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HPCasCode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hpc-team
HPCasCode
Commits
2de17d14
Commit
2de17d14
authored
9 years ago
by
Simon Michnowicz
Browse files
Options
Downloads
Patches
Plain Diff
added conditionals to prevent installation if drivers already present (Note, tested only on redhat)
parent
17b43371
No related branches found
Branches containing commit
No related tags found
1 merge request
!4
added conditionals to prevent installation if drivers already present (Note, tested only on redhat)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
roles/mellanox_drivers/tasks/main.yml
+18
-15
18 additions, 15 deletions
roles/mellanox_drivers/tasks/main.yml
with
18 additions
and
15 deletions
roles/mellanox_drivers/tasks/main.yml
+
18
−
15
View file @
2de17d14
...
@@ -8,11 +8,17 @@
...
@@ -8,11 +8,17 @@
ignore_errors
:
true
ignore_errors
:
true
when
:
ansible_os_family == "RedHat"
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
-
name
:
yum update to upgrade kernel
shell
:
"
yum
update
-y"
shell
:
"
yum
update
-y"
sudo
:
true
sudo
:
true
ignore_errors
:
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
# A REBOOT IS NEEDED AFTER a KERNEL UPDATE
...
@@ -23,10 +29,9 @@
...
@@ -23,10 +29,9 @@
poll
:
0
poll
:
0
ignore_errors
:
true
ignore_errors
:
true
sudo
:
true
sudo
:
true
when
:
ansible_os_family == "RedHat"
when
:
ansible_os_family == "RedHat"
and drivers_installed|failed
-
name
:
waiting for server to come back
-
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
local_action
:
wait_for host={{ ansible_ssh_host }} state=started port=22 delay=10 search_regex=OpenSSH
sudo
:
false
sudo
:
false
...
@@ -34,11 +39,6 @@
...
@@ -34,11 +39,6 @@
local_action
:
wait_for host={{ ansible_ssh_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
sudo
:
false
-
name
:
test for existing installation of drivers
command
:
ibv_devinfo
sudo
:
true
register
:
drivers_installed
ignore_errors
:
true
-
name
:
copy driver source
-
name
:
copy driver source
#make this a variable
#make this a variable
...
@@ -62,12 +62,14 @@
...
@@ -62,12 +62,14 @@
local_action
:
command ./scripts/map_ib_ip.pl {{ inventory_hostname }}
local_action
:
command ./scripts/map_ib_ip.pl {{ inventory_hostname }}
register
:
ip_address
register
:
ip_address
sudo
:
false
sudo
:
false
#when: drivers_installed|failed
-
name
:
template IP address
-
name
:
template IP address
template
:
dest=/etc/sysconfig/network-scripts/ifcfg-ens6 src=ifcfg-ens6.j2 owner=root group=root
template
:
dest=/etc/sysconfig/network-scripts/ifcfg-ens6 src=ifcfg-ens6.j2 owner=root group=root
sudo
:
true
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
#ubuntu equivalent of previous command
-
name
:
Ubuntu network interfaces - line
1
-
name
:
Ubuntu network interfaces - line
1
lineinfile
:
lineinfile
:
...
@@ -76,7 +78,8 @@
...
@@ -76,7 +78,8 @@
line
:
auto {{ MELLANOX_DEVICE_NAME }}
line
:
auto {{ MELLANOX_DEVICE_NAME }}
state
:
present
state
:
present
sudo
:
true
sudo
:
true
when
:
ansible_os_family=="Debian"
when
:
ansible_os_family=="Debian" and drivers_installed|failed
-
name
:
Ubuntu network interfaces - line
2
-
name
:
Ubuntu network interfaces - line
2
lineinfile
:
lineinfile
:
args
:
args
:
...
@@ -85,7 +88,7 @@
...
@@ -85,7 +88,7 @@
state
:
present
state
:
present
insertafter
:
"
auto
{{
MELLANOX_DEVICE_NAME
}}"
insertafter
:
"
auto
{{
MELLANOX_DEVICE_NAME
}}"
sudo
:
true
sudo
:
true
when
:
ansible_os_family=="Debian"
when
:
ansible_os_family=="Debian"
and drivers_installed|failed
-
name
:
Ubuntu network interfaces - line
3
-
name
:
Ubuntu network interfaces - line
3
lineinfile
:
lineinfile
:
args
:
args
:
...
@@ -94,7 +97,7 @@
...
@@ -94,7 +97,7 @@
state
:
present
state
:
present
insertafter
:
"
iface
{{
MELLANOX_DEVICE_NAME
}}
inet
static"
insertafter
:
"
iface
{{
MELLANOX_DEVICE_NAME
}}
inet
static"
sudo
:
true
sudo
:
true
when
:
ansible_os_family=="Debian"
when
:
ansible_os_family=="Debian"
and drivers_installed|failed
#
#
# A REBOOT IS NEEDED AFTER SUCCESSFUL INSTALL
# A REBOOT IS NEEDED AFTER SUCCESSFUL INSTALL
#
#
...
@@ -104,12 +107,12 @@
...
@@ -104,12 +107,12 @@
poll
:
0
poll
:
0
ignore_errors
:
true
ignore_errors
:
true
sudo
:
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'
-
name
:
restart machine for Ubuntu -cos it is 'special'
command
:
"
sudo
shutdown
-r
now"
shell
:
"
sleep
5;
sudo
shutdown
-r
now"
async
:
2
async
:
2
poll
:
0
poll
:
1
ignore_errors
:
true
ignore_errors
:
true
sudo
:
true
sudo
:
true
when
:
ansible_os_family=="Debian"
when
:
ansible_os_family=="Debian"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment