I typically do something like:
- name: Disable the ubuntu user
- name: Remove the ubuntu users ssh key
On Thu, Apr 12, 2018 at 4:11 PM, POOJA VENKATESH <
> I am trying to disable a user and not remove it completely
> - hosts: target1
> - name: disable the user
> become: yes
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to email@example.com.
> To view this discussion on the web visit https://groups.google.com/d/
> For more options, visit https://groups.google.com/d/optout.
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 post to this group, send email to firstname.lastname@example.org.
To view this discussion on the web visit
For more options, visit https://groups.google.com/d/optout.