35 lines
985 B
YAML
35 lines
985 B
YAML
---
|
|
- name: Install networkd on Fedora
|
|
when: ansible_distribution == "Fedora"
|
|
become: true
|
|
dnf:
|
|
state: latest
|
|
name:
|
|
- systemd-resolved
|
|
- systemd-networkd
|
|
|
|
- name: Install networkd on CentOS 7
|
|
when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7"
|
|
become: true
|
|
yum:
|
|
state: latest
|
|
name:
|
|
- systemd-resolved
|
|
- systemd-networkd
|
|
|
|
- name: Install networkd on CentOS 8
|
|
when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "8"
|
|
become: true
|
|
block:
|
|
- name: Install this super-legitimate and definitely vetted COPR repo
|
|
shell:
|
|
creates: /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:fschwarz:systemd-networkd.repo
|
|
cmd: dnf copr enable fschwarz/systemd-networkd
|
|
warn: false
|
|
- name: Install networkd
|
|
dnf:
|
|
state: latest
|
|
name:
|
|
# This now comes from aforementioned very good COPR repo
|
|
- systemd-networkd
|