- name: Set sudoers
  become: "{{ false if inventory_hostname == 'nas.home.lan' else true }}"
  block:
    - name: Allow the backup jd to sudo /myapps/omv_backup.py
      community.general.sudoers:
        name: allow-backup
        state: present
        user: jd
        commands:
          - /myapps/omv_backup.py *
          - /usr/sbin/poweroff
          - /usr/sbin/shutdown *
