---
- name: Ensure device mapper modules loaded
  template:
    src: glusterfs.conf.j2
    dest: /etc/modules-load.d/glusterfs.conf
  register: km

- name: Install kernel modules package on Fedora
  shell: "dnf install kernel-modules-$(uname -r) -y"
  when:
  - ansible_distribution == "Fedora"
  - not (openshift_is_atomic | default(False) | bool)

- name: load kernel modules
  systemd:
    name: systemd-modules-load.service
    state: restarted
  when: km is changed
