---
- name: Unload nmi_watchdog
  modprobe:
    name: nmi_watchdog
    state: absent

- name: Disable nmi_watchdog via GRUB config
  lineinfile:
    dest: /etc/default/grub
    line: 'GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX nmi_watchdog=0"'
    insertafter: '^GRUB_CMDLINE_LINUX="'
  register: __proxmox_grub

- name: Update GRUB configuration
  command: update-grub
  register: __proxmox_grub_update
  failed_when: ('error' in __proxmox_grub_update.stderr)
  when: __proxmox_grub|changed
  tags: skiponlxc

---
- name: Unload nmi_watchdog
  modprobe:
    name: nmi_watchdog
    state: absent

- name: Unload softdog
  modprobe:
    name: softdog
    state: absent

- name: Disable nmi_watchdog via GRUB config
  lineinfile:
    dest: /etc/default/grub
    line: 'GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX nmi_watchdog=0"'
    insertafter: '^GRUB_CMDLINE_LINUX="'
  register: __proxmox_grub

- name: Update GRUB configuration
  command: update-grub
  register: __proxmox_grub_update
  failed_when: ('error' in __proxmox_grub_update.stderr)
  when: __proxmox_grub|changed
  tags: skiponlxc

Remove softdog module on live systems too
Remove softdog module on live systems too
