31 lines
712 B
YAML
31 lines
712 B
YAML
---
|
|
|
|
- name: Check role vars
|
|
assert:
|
|
that:
|
|
- networkd_apply_action == "restart" or networkd_apply_action == "reload" or networkd_apply_action == "nothing"
|
|
fail_msg: 'networkd_apply_action shoud be "restart", "reload" or "nothing"'
|
|
quiet: yes
|
|
|
|
- import_tasks: deploy_configs.yml
|
|
|
|
- import_tasks: remove_unmanaged.yml
|
|
|
|
- name: networkd | Deploy resolv.conf
|
|
template:
|
|
src: resolv.conf.j2
|
|
dest: /etc/resolv.conf
|
|
mode: 0644
|
|
owner: root
|
|
group: root
|
|
when: networkd_resolv_conf_content is defined
|
|
|
|
- name: networkd | Enable and start service
|
|
systemd:
|
|
name: systemd-networkd
|
|
state: started
|
|
enabled: yes
|
|
|
|
- name: networkd | Run handlers now
|
|
meta: flush_handlers
|