Fixing issue #11 (renders NetworkManager useless, but blocks issue).
This commit is contained in:
parent
f7ef8be227
commit
e6ac8c5c27
@ -49,13 +49,3 @@
|
||||
state: present
|
||||
with_items: "{{ base_docenti_addpkg }}"
|
||||
when: ansible_local.noderole.role == 'docenti' and base_docenti_addpkg|length > 0
|
||||
|
||||
- name: Correggo NetworkManager per gestire la rete
|
||||
lineinfile:
|
||||
dest: /etc/network/interfaces
|
||||
regexp: "{{ item }}"
|
||||
state: absent
|
||||
when: ansible_product_name != "VirtualBox"
|
||||
with_items:
|
||||
- ^auto eth0
|
||||
- ^iface eth0
|
||||
|
@ -1,6 +1,11 @@
|
||||
---
|
||||
# Domain configurations
|
||||
|
||||
- include: networkmanager.yml
|
||||
tags:
|
||||
- domain
|
||||
- networkmanager
|
||||
|
||||
- include: ntp.yml
|
||||
tags:
|
||||
- domain
|
||||
|
19
roles/domain/tasks/networkmanager.yml
Normal file
19
roles/domain/tasks/networkmanager.yml
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
# Fixing NetworkManager issues.
|
||||
|
||||
- name: Ensuring first NIC will never be disabled again
|
||||
lineinfile:
|
||||
line: "{{ item }}"
|
||||
state: present
|
||||
dest: /etc/network/interfaces
|
||||
insertafter: EOF
|
||||
with_items:
|
||||
- " "
|
||||
- "auto eth0"
|
||||
- "iface eth0 inet dhcp"
|
||||
|
||||
# Hiding icon for any sessions
|
||||
|
||||
- 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
|
Loading…
x
Reference in New Issue
Block a user