- hosts: all
roles:
- grokon.adduser
vars:
adduser__groups:
- name: "foo"
gid: 3001
sudo: /usr/bin/sudo
adduser__users:
- name: "boo"
groups: ["foo"]
ssh_key: ["ssh-rsa blahblahblah"]
shell: "/bin/bash"
uid: 3000
home: "/home/foo"
system: true
An Ansible Role that added users and groups on Debian
The file to store authorized keys in
adduser__authorized_keys_file: .ssh/authorized_keys
Create home dirs for new users? Set this to false if you manage home directories in some other way.
adduser__create_homedir: true
Create a group for every user and make that their primary group
adduser__create_per_user_group: true
adduser__default_group: users
The default shell for a user if none is specified
adduser__default_shell: /bin/bash
Delete users and groups that are not managed by ansible
adduser__delete_unmanaged: true
The group to add users to docker group is docker is installed and this is set to true
adduser__docker_group: docker
If we're not creating a per-user group, then this is the group all users belong to
List of groups to create
adduser__groups: []
adduser__groups_to_create:
- name: "foo"
gid: 1000
- name: "bar"
gid: 1001
Delete the home directory of a user when the user is removed?
adduser__remove_home: false
adduser__stats_file_path: ~/.ansible
The file to store user stats in
List of users to create
adduser__users: []
adduser__users:
- name: "foo"
group: ["foo", "bar"]
ssh_key: ['ssh-rsa blahblahblah']
shell: "/bin/bash"
uid: 1000
home: "/home/foo"
is_system_user: true
docker_group: true
adduser
groups
users
None.
MIT
grokon