diff --git a/basics.yml b/basics.yml index 350324f..f3f2295 100644 --- a/basics.yml +++ b/basics.yml @@ -100,12 +100,14 @@ path: /etc/network/interfaces regexp: '(^allow-hotplug .*)' replace: '#\1' + when: stat_result.stat.exists - name: Disable all Network-config but source interfaces.d in /etc/network/interfaces because dhcpcd will do the job replace: path: /etc/network/interfaces regexp: '(^auto .*)' replace: '#\1' + when: stat_result.stat.exists - name: Set a hostname ansible.builtin.hostname: