Skip to content

Commit

Permalink
fix: be a bit smarter when reloading kernel modules
Browse files Browse the repository at this point in the history
  • Loading branch information
onedr0p committed Dec 11, 2023
1 parent bf28fba commit a374c72
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bootstrap/templates/ansible/playbooks/cluster-prepare.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,15 @@
fstype: swap
state: absent
loop: ["none", "swap"]
- name: System Configuration | Kernel modules (1)
- name: System Configuration | Create Kernel modules
ansible.builtin.copy:
dest: "/etc/modules-load.d/{% raw %}{{ item }}{% endraw %}.conf"
mode: "0644"
content: "{% raw %}{{ item }}{% endraw %}"
loop: ["br_netfilter", "ceph", "ip_vs", "ip_vs_rr", "nbd", "overlay", "rbd"]
- name: System Configuration | Kernel modules (2)
register: modules_status
- name: System Configuration | Reload Kernel modules # noqa: no-changed-when no-handler
when: modules_status.changed
ansible.builtin.systemd:
name: systemd-modules-load
state: restarted
Expand Down

0 comments on commit a374c72

Please sign in to comment.