Skip to content
Snippets Groups Projects
Commit c594e0e8 authored by Simon Michnowicz's avatar Simon Michnowicz
Browse files

improved comments

parent 0c16fdad
No related branches found
No related tags found
1 merge request!32Simons updates
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment