This repository has been archived on 2024-02-16. You can view files and clone it, but cannot push or open issues or pull requests.
sysconfig/roles/networking/tasks/networking.yml
Hoang Nguyen ec72f75587
Add 'ntpd' and 'auditd' roles
More changes:
- Remove 'grub' role. We shouldn't touch anything related to the
  bootloader here, as it's dangerous. I'll write docs for myself on
  this.
- Fix linting here and there, so ansible-lint won't complain
- Refactor group_vars/all.yml to be more readable
2023-04-06 00:00:00 +07:00

26 lines
691 B
YAML

---
- name: Reconfigure 'networking' service
when: dhcp_client in ['udhcpc', 'dhcpcd', 'dhclient']
block:
- name: networking | Configure /etc/network/interfaces
template:
src: interfaces.j2
dest: /etc/network/interfaces
owner: root
group: root
mode: '644'
- name: networking | Restart 'networking' service
service:
name: networking
state: restarted
enabled: true
runlevel: boot
- name: networking | Stop 'networking' service on boot in favor of {{ dhcp_client }}
service:
name: networking
enabled: false
runlevel: boot
when: not dhcp_client in ['udhcpc', 'dhcpcd', 'dhclient']