catena.system.users
Manage system users and groups.
See defaults/main.yml
for details.
It uses ansible.builtin.user and ansible.posix.authorized_key modules in combination.
# Example
catena_users:
- username: satoshi
password: '{{ password }}'
# Description (aka Gecos) of user account
# https://www.redhat.com/sysadmin/linux-gecos-demystified
comment: Satoshi Nakamoto
# Comma separated groups user will be added to
# When empty '', the user is removed from all groups
groups: adm,sys
shell: /bin/bash
authorized_keys:
- key: "{{ lookup('file', '~/.ssh/id_ed25519.pub') }}"
state: present
# Remove the user account when state is 'absent'
remove: no
state: present
It uses ansible.builtin.group module.
# Example
catena_groups:
- name: backup
state: absent
- name: bitcoin
state: present
gid: 2009