diff --git a/basics.yml b/basics.yml index bb2dd6d..4242b32 100644 --- a/basics.yml +++ b/basics.yml @@ -121,6 +121,7 @@ path: /etc/dhcpcd.conf line: denyinterfaces docker0 virbr0 tornet0 veth* br* when: nocontainer.stat.exists == true + register: dhcpcd - name: Check weather /etc/network/interfaces exists stat: @@ -148,6 +149,12 @@ replace: '#\1' when: stat_result.stat.exists + - name: Restart dhcpcd + service: + name: dhcpcd + state: restarted + when: dhcpcd.changed + - name: Set a hostname ansible.builtin.hostname: name: "{{inventory_hostname}}"