Skip to content

Commit

Permalink
Fix permanently enabling systemd-networkd
Browse files Browse the repository at this point in the history
Work around the service module not yet handling "enabled-runtime"
properly. This patch should be reverted when the following can be used:
ansible/ansible#77754
  • Loading branch information
MoteHue committed Jul 15, 2024
1 parent 0286a36 commit af56b41
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions roles/systemd_networkd/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,21 @@
- ansible_facts.distribution_major_version >= '12'

- name: Enable systemd-networkd
become: true
ansible.builtin.service:
name: systemd-networkd
enabled: true
when: systemd_networkd_network or systemd_networkd_link or systemd_networkd_netdev
block:
# TODO(mattcrees): Remove once this gets into a versioned release:
# https://github.com/ansible/ansible/pull/77754
- name: Temporarily disable systemd-networkd

Check failure on line 23 in roles/systemd_networkd/tasks/main.yml

View workflow job for this annotation

GitHub Actions / lint / Ansible 2.14 lint

yaml[indentation]

Wrong indentation: expected 4 but found 6
become: true
ansible.builtin.service:
name: systemd-networkd
enabled: false

- name: Enable systemd-networkd
become: true
ansible.builtin.service:
name: systemd-networkd
enabled: true

- name: Start and enable systemd-resolved
become: true
Expand Down

0 comments on commit af56b41

Please sign in to comment.