Hoang Nguyen
ec72f75587
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
26 lines
691 B
YAML
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']
|