system/tasks/dhcpcd.yml
vincent 6c2ddb35a6
Some checks failed
continuous-integration/drone/push Build is failing
fix: issue with debian when migrate to resolved-systemd
2023-10-24 22:43:19 +02:00

30 lines
628 B
YAML

---
- name: Ensure dhcpcd is instaled
ansible.builtin.package:
name: dhcpcd
state: present
become: true
- name: Change hostname setting
ansible.builtin.lineinfile:
dest: /etc/dhcpcd.conf
regexp: "^#hostname"
line: "hostname"
state: present
become: true
- name: start and enable dhcpcd
ansible.builtin.service:
name: dhcpcd
state: started
enabled: true
become: true
when: ansible_os_family == "Debian"
- name: stop and disable networking
ansible.builtin.service:
name: networking
state: stopped
enabled: false
become: true
when: ansible_os_family == "Debian"