Marking a user as "absent" can result in /bin/sh and other things being deleted
If a user is marked as absent in host_vars/wsh.webarchitects.org.uk.yml like this (without deleting all the other variables):
blog2:
users_state: absent
users_name: Bloggy Mc Blog Face
users_email: chris@webarch.net
users_ssh_public_keys:
- https://git.coop/chris.keys
users_quota: 1G
users_notify_passwd: true
users_matomo_notify_passwd: true
users_mariadb_notify_passwd: true
users_mariadb_databases:
- blog2
users_phpfpm_pm: dynamic
users_phpfpm_max_children: 4
users_apache_virtual_hosts:
default:
users_apache_type: php
users_apache_robots: deny
users_apache_server_name: www.blog2.wsh.webarchitects.org.uk
users_apache_server_aliases:
- blog2.wsh.webarchitects.org.uk
users_daily_scripts:
- "wp-update {{ users_basedir }}/blog2/{{ users_sites_dir }}/default"
users_cms: wordpress
wordpress_dbname: blog2
users_apache_expires: medium
users_groups:
- chroot
- phpfpm
users_group_members:
- www-data
users_home_owner: root
users_home_mode: "0750"
users_skel: /usr/local/etc/skel.d/www
Then the task:
TASK [users : Users accounts absent]
Results in:
[WARNING]: Module invocation had junk after the JSON data: /bin/sh: 1: sleep: not found
[WARNING]: Error deleting remote temporary files (rc: 1, stderr: /bin/bash: No such file or directory })
And the server needing rebuilding