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
c594e0e8
Commit
c594e0e8
authored
8 years ago
by
Simon Michnowicz
Browse files
Options
Downloads
Patches
Plain Diff
improved comments
parent
0c16fdad
No related branches found
No related tags found
1 merge request
!32
Simons updates
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
roles/mellanox_drivers/tasks/main.yml
+21
-10
21 additions, 10 deletions
roles/mellanox_drivers/tasks/main.yml
with
21 additions
and
10 deletions
roles/mellanox_drivers/tasks/main.yml
+
21
−
10
View file @
c594e0e8
...
...
@@ -65,18 +65,29 @@
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
#get the interface name
-
name
:
get devide name of Mellanox Interface from ibdev2netdev.sh
script
:
ibdev2netdev.sh
register
:
MELLANOX_DEVICE_NAME
sudo
:
true
when
:
ansible_os_family=="RedHat" and ansible_distribution_major_version == "7" and drivers_installed|failed
#- debug: msg="The MELLANOX_DEVICE_NAME is {{ MELLANOX_DEVICE_NAME }} "
# #"
# - debug: msg="The MELLANOX_DEVICE_NAME.stdout is {{ MELLANOX_DEVICE_NAME.stdout }} "
# #"
-
name
:
create /etc/sysconfig/network-scripts/ifcfg-<device name>
template
:
dest=/etc/sysconfig/network-scripts/ifcfg-{{ MELLANOX_DEVICE_NAME.stdout }} src=ifcfg-conf.j2 owner=root group=root
sudo
:
true
when
:
ansible_os_family=="RedHat"
#ubuntu equivalent of previous command
-
name
:
Ubuntu network interfaces - line
1
lineinfile
:
args
:
dest
:
/etc/network/interfaces
line
:
auto {{ MELLANOX_DEVICE_NAME }}
line
:
auto {{ MELLANOX_DEVICE_NAME
.stdout
}}
state
:
present
sudo
:
true
when
:
ansible_os_family=="Debian" and drivers_installed|failed
...
...
@@ -85,9 +96,9 @@
lineinfile
:
args
:
dest
:
/etc/network/interfaces
line
:
iface {{ MELLANOX_DEVICE_NAME }} inet static
line
:
iface {{ MELLANOX_DEVICE_NAME
.stdout
}} inet static
state
:
present
insertafter
:
"
auto
{{
MELLANOX_DEVICE_NAME
}}"
insertafter
:
"
auto
{{
MELLANOX_DEVICE_NAME
.stdout
}}"
sudo
:
true
when
:
ansible_os_family=="Debian" and drivers_installed|failed
...
...
@@ -97,7 +108,7 @@
dest
:
/etc/network/interfaces
line
:
address {{ ip_address.stdout }}
state
:
present
insertafter
:
"
iface
{{
MELLANOX_DEVICE_NAME
}}
inet
static"
insertafter
:
"
iface
{{
MELLANOX_DEVICE_NAME
.stdout
}}
inet
static"
sudo
:
true
when
:
ansible_os_family=="Debian" and drivers_installed|failed
#
...
...
@@ -129,8 +140,8 @@
when
:
drivers_installed|failed
-
name
:
bring up interface
#variable=eth0 or ens6
command
:
ifup {{ MELLANOX_DEVICE_NAME }}
#variable=eth0 or ens6
or eth1
command
:
ifup {{ MELLANOX_DEVICE_NAME
.stdout
}}
sudo
:
true
when
:
ansible_os_family=="RedHat" and ansible_distribution_major_version == "7"
...
...
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