How to mask systemd unit in Ansible

---
- name: Mask single systemd target 
  hosts: localhost
  become: true

  tasks:
    - name: Mask poweroff.target
      systemd:
        name: poweroff.target
        masked: true