2017-01-22 22:44:52 +01:00
|
|
|
---
|
2019-11-20 00:51:41 +01:00
|
|
|
# Since students are disabling deliberately the network interface from
|
|
|
|
# NetworkManager, we insert the default interface in /etc/network/interfaces
|
|
|
|
# so they are not available to NM
|
2017-01-22 22:44:52 +01:00
|
|
|
|
|
|
|
- name: Ensuring first NIC will never be disabled again
|
|
|
|
lineinfile:
|
|
|
|
line: "{{ item }}"
|
|
|
|
state: present
|
|
|
|
dest: /etc/network/interfaces
|
|
|
|
insertafter: EOF
|
|
|
|
with_items:
|
|
|
|
- " "
|
2019-11-20 00:51:41 +01:00
|
|
|
- "auto {{ ansible_default_ipv4.interface }}"
|
|
|
|
- "iface {{ ansible_default_ipv4.interface }} inet dhcp"
|
2017-01-22 22:44:52 +01:00
|
|
|
|
2019-11-20 00:51:41 +01:00
|
|
|
# Hiding NetworkManager icon from any sessions
|
2017-01-22 22:44:52 +01:00
|
|
|
|
|
|
|
- name: Disabling NetworkManager from popping up in sessions
|
|
|
|
shell: mv /etc/xdg/autostart/nm-applet.desktop /etc/xdg/autostart/nm-applet.desktop.disabled
|
|
|
|
ignore_errors: yes
|