diff options
Diffstat (limited to 'roles/debian/tasks')
-rw-r--r-- | roles/debian/tasks/networkd.yml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/roles/debian/tasks/networkd.yml b/roles/debian/tasks/networkd.yml index 3ad37df..50791b3 100644 --- a/roles/debian/tasks/networkd.yml +++ b/roles/debian/tasks/networkd.yml @@ -1,4 +1,15 @@ --- +- name: Configure systemd-networkd + ini_file: + path: '/etc/systemd/networkd.conf' + no_extra_spaces: yes + section: "{{ item.key.split('.',1)[0] }}" + option: "{{ item.key.split('.',1)[1] }}" + value: "{{ item.value|ternary(item.value,omit) }}" + state: "{{ item.value|ternary('present','absent') }}" + with_dict: '{{ networkd_conf }}' + when: use_networkd|bool + - name: Enable/disable systemd-networkd systemd: name: systemd-networkd.service |