Fixing issue #11 (renders NetworkManager useless, but blocks issue).

This commit is contained in:
Emiliano Vavassori 2017-01-22 22:44:52 +01:00
parent f7ef8be227
commit e6ac8c5c27
3 changed files with 24 additions and 10 deletions

View File

@ -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

View File

@ -1,6 +1,11 @@
---
# Domain configurations
- include: networkmanager.yml
tags:
- domain
- networkmanager
- include: ntp.yml
tags:
- domain

View 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