fix: be a bit smarter when reloading kernel modules
This commit is contained in:
1 parent
bf28fbaebf
commit
a374c72887
1 file changed
+4
-2
@@ -100,13 +100,15 @@
|
|||||||
fstype: swap
|
fstype: swap
|
||||||
state: absent
|
state: absent
|
||||||
loop: ["none", "swap"]
|
loop: ["none", "swap"]
|
||||||
- name: System Configuration | Kernel modules (1)
|
- name: System Configuration | Create Kernel modules
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: "/etc/modules-load.d/{% raw %}{{ item }}{% endraw %}.conf"
|
dest: "/etc/modules-load.d/{% raw %}{{ item }}{% endraw %}.conf"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
content: "{% raw %}{{ item }}{% endraw %}"
|
content: "{% raw %}{{ item }}{% endraw %}"
|
||||||
loop: ["br_netfilter", "ceph", "ip_vs", "ip_vs_rr", "nbd", "overlay", "rbd"]
|
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:
|
ansible.builtin.systemd:
|
||||||
name: systemd-modules-load
|
name: systemd-modules-load
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|||||||
Reference in new issue
Block a user