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
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow