From Soiled Motmot, 1 Week ago, written in Plain Text.
  1. ---
  2.  - hosts: "{{ variable_host }}"
  3.    gather_facts: no
  4.    tasks:
  5.      - name: Deleting user from group and its home directory.
  6.        become: yes
  7.        become_method: sudo
  8.        user:
  9.          name: "{{ variable_user }}"
  10.          remove: yes
  11.          group: user
  12.          state: absent
captcha