basics.yml aktualisiert

This commit is contained in:
olli 2023-08-23 11:58:30 +02:00
parent cf89c3124c
commit fedf0967c7

View File

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