diff options
author | Emil Renner Berthing <esmil@labitat.dk> | 2019-07-06 16:53:05 +0200 |
---|---|---|
committer | Emil Renner Berthing <esmil@labitat.dk> | 2019-07-06 16:53:05 +0200 |
commit | 9eeca839d5d355553796602a425f042ad62ade20 (patch) | |
tree | 0074035f8993b592ca3b40fd6a3c684c515e4d83 /roles/debian/tasks | |
parent | ab414b16b09e4a707b8cd2cff6eaa7819dd287d1 (diff) | |
download | labitat-ansible-9eeca839d5d355553796602a425f042ad62ade20.tar.gz labitat-ansible-9eeca839d5d355553796602a425f042ad62ade20.tar.xz labitat-ansible-9eeca839d5d355553796602a425f042ad62ade20.zip |
debian: networkd: configure networkd.conf
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 |