From: Kienan Stewart Date: Wed, 30 Aug 2023 18:01:35 +0000 (-0400) Subject: ansible: Mask networking.service on Debian when starting to manage netplan X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=719e10f67c3e39c442fd961cd0d453eaa67ba941;p=lttng-ci.git ansible: Mask networking.service on Debian when starting to manage netplan Change-Id: I59bb6d399b274bcb7f35ab777d776d7bdef7407d --- diff --git a/automation/ansible/roles/netplan/tasks/main.yml b/automation/ansible/roles/netplan/tasks/main.yml index b9b6896..2bef5d8 100644 --- a/automation/ansible/roles/netplan/tasks/main.yml +++ b/automation/ansible/roles/netplan/tasks/main.yml @@ -12,6 +12,18 @@ group: root mode: '0640' register: netplan_default_yaml + - name: Disable ifupdown on Debian + when: ansible_distribution == "Debian" + block: + - name: Disable ifupdown networking + ansible.builtin.systemd: + name: networking.service + masked: true + - name: Enable systemd-networkd + ansible.builtin.systemd: + name: systemd-networkd + enabled: true + state: started - name: Apply netplan when: netplan_default_yaml.changed and netplan_apply ansible.builtin.command: