I need to install the Linux package ifupdown2
on a couple of remote Debian servers and want to use Ansible for this task. Since ifupdown2
replaces the standard Debian network tool ifupdown
, no network connection is possible during the installation process. After installation, a restart of the network service is necessary to bring the interfaces up again. Currently I use this async Ansible command:
- name: Install ifupdown2
shell: apt-get install -y ifupdown2 && systemctl restart networking
async: 180
poll: 5
However, the execution is quite unreliable and sometimes ends in a timeout. Do you know of a more reliable way to install ifupdown2
via Ansible?