This is an Ansible role which users and user's authorized keys manages on Linux and Windows.
ansible-galaxy install arillso.users
None
list of users to add
users: []
list of users to add by host vars
users_list_host: []
list of users to add by group vars
users_list_group: []
users:
- username: foobar (required)
name: Foo Bar
uid: 1000
group: staff
password: xxxxx (a hash created with: mkpasswd)
groups: ["adm", "www-data"]
append: no (only append groups, leave others)
home_mode: "0750"
home_create: yes
home: /path/to/user/home
system: no
authorized_keys: []
authorized_keys_exclusive: yes
ssh_key_type: rsa
ssh_key_bits: 2048
ssh_key_password: ""
ssh_key_generate: no
ssh_key: "xxx"
shell: /bin/bash
update_password: always
users:
- username: foobar (required)
name: Foo Bar
description: User
password: xxxxx
groups: ['adm', 'www-data']
hide: true
users home directory
users_home: /home
default user's primary group for users
users_group:
default user's secondary groups
users_groups: []
default user's home directory permissions
users_home_mode: '0755'
default user's ssh key type
users_ssh_key_type: rsa
default user's ssh key bits
users_ssh_key_bits: 2048
default user's setting for authorized keys exclusive
users_authorized_keys_exclusive: 'no'
None
- hosts: all
roles:
- arillso.users
This project is under the MIT License. See the LICENSE file for the full license text.
(c) 2020, Arillso