diff options
author | Emil Renner Berthing <esmil@labitat.dk> | 2020-02-29 20:15:53 +0100 |
---|---|---|
committer | Emil Renner Berthing <esmil@labitat.dk> | 2020-02-29 20:16:10 +0100 |
commit | 515a7883f583e4981f74e9bae8bbe1833f931924 (patch) | |
tree | b0619bf8726db80120f0ef5725c2e6bbd7d7396e /roles/fedora/tasks | |
parent | e2efdd3540a2d67d5ffd90411110902c7f336b1f (diff) | |
download | labitat-ansible-515a7883f583e4981f74e9bae8bbe1833f931924.tar.gz labitat-ansible-515a7883f583e4981f74e9bae8bbe1833f931924.tar.xz labitat-ansible-515a7883f583e4981f74e9bae8bbe1833f931924.zip |
fedora: networkd: configure networkd.conf
Diffstat (limited to 'roles/fedora/tasks')
-rw-r--r-- | roles/fedora/tasks/networkd.yml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/roles/fedora/tasks/networkd.yml b/roles/fedora/tasks/networkd.yml index de38fa4..35a45d1 100644 --- a/roles/fedora/tasks/networkd.yml +++ b/roles/fedora/tasks/networkd.yml @@ -1,4 +1,17 @@ --- +- name: Configure networkd.conf + vars: + networkd_conf: '{{ networkd_conf_default|combine(networkd_conf_role) }}' + 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 is string)|ternary(item.value,omit) }}" + state: "{{ (item.value is string)|ternary('present','absent') }}" + with_dict: '{{ networkd_conf }}' + when: use_networkd and (ansible_distribution_version == 'rawhide' or ansible_distribution_version|int > 29 + - name: Enable/disable systemd-networkd systemd: name: systemd-networkd.service |