Eu tenho um manual ansible com as seguintes tarefas
- name: Get aptitude for upgrade
apt: pkg=aptitude state=present
- name: Update APT package cache
apt: update_cache=yes cache_valid_time=3600
Quando eu adiciono
- name: Upgrade APT to the latest packages
apt: upgrade=safe
a interface eth0 desaparece magicamente.
cat /etc/network/interfaces:
auto lo
iface lo inet loopback
auto etho0
iface eth0 inet dhcp
ifconfigantes do apt: upgrade=safe:
eth0 Link encap:Ethernet HWaddr b8:27:eb:9e:16:fd
inet addr:192.168.1.161 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::ba27:ebff:fe9e:16fd/64 Scope:Link
inet6 addr: 2002:5e4f:b23c:1234:ba27:ebff:fe9e:16fd/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:95254 errors:0 dropped:0 overruns:0 frame:0
TX packets:30815 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:136917073 (136.9 MB) TX bytes:2880058 (2.8 MB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:160 errors:0 dropped:0 overruns:0 frame:0
TX packets:160 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11840 (11.8 KB) TX bytes:11840 (11.8 KB)
e depois:
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:160 errors:0 dropped:0 overruns:0 frame:0
TX packets:160 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11840 (11.8 KB) TX bytes:11840 (11.8 KB)
Estou executando um novo servidor Ubuntu 16.04 LTS. Alguma idéia de por que a eth0 desaparece? Obviamente apt: upgrade=safe é o problema, mas por quê?
ifconfig -asurpreendentemente fornece uma saída diferente, mas eth0 ainda está faltando:
Responder1
Depois de instalar o gerenciador de rede o problema desapareceu
- name: Get network-manager
apt: state=installed pkg=network-manager