---
- hosts: target1
tasks:
- name: disable the user
become: yes
user:
name: random
group: sudo
state: absent
When I run this playbook I see that the user is removed. Is there a way I can disable the user other than using expire parameter? I just want the user to stay but not have any login capabilities.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAAGG3SAX-Anb95ODx10xL21WoyzRN3VwWcogZwvrxweUowd5Qg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAD8N0v8re6zFFnDo5kQcv2zdUXzbSC-p%2ByXvTM2Q5CBvjZth9w%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CACVha7dEG4i3WLrbEY_YkLJbnHvARXBAJNmUHrQw0q1P8uHrxQ%40mail.gmail.com.