Skip to content

Latest commit

 

History

History

users

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Manage system users and groups.

Role variables

See defaults/main.yml for details.

catena_users

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

catena_groups

It uses ansible.builtin.group module.

# Example
catena_groups:
  - name: backup
    state: absent
  - name: bitcoin
    state: present
    gid: 2009