2

A want just remount / on my host.

If I use a command module:

- name: Change noacl in /etc/fstab
  become: True
  replace:
     dest: /etc/fstab
     backup: yes
     regexp: 'noacl'
     replace: 'acl'
  register: fstab

- name: remounte /
  become: true
  command: 'mount -o remount /'
  when: fstab.changed

but I have msg from lint:

[ANSIBLE0006] mount used in place of mount module

[ANSIBLE0016] Tasks that run when changed should likely be handlers

Hove I can execute same in ansible module mount?

Community
  • 1
  • 1
Zak Shirak
  • 89
  • 4
  • 12

0 Answers0