Skip to content

alysoid/ansible-users

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Catena Ansible Role: users

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

About

Manage system users and groups

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages