- name: Kernel module nf_conntrack community.general.modprobe: name: nf_conntrack state: present persistent: present - name: Kernel module xt_conntrack community.general.modprobe: name: nf_conntrack state: present persistent: present - name: blacklist modules copy: src: ansible-blacklist.conf dest: /etc/modprobe.d/ansible-blacklist.conf register: blacklist - name: depmod and initramfs block: - name: depmod command: depmod -ae - name: initramfs command: update-initramfs -u when: blacklist.changed