Skip to content

This is an Ansible role which users and user's authorized keys manages.

License

Notifications You must be signed in to change notification settings

elsoa-invitech/ansible.users

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Role: users

Build Status license Ansible Galaxy Ansible Role

Description

This is an Ansible role which users and user's authorized keys manages on Linux and Windows.

Installation

ansible-galaxy install arillso.users

Requirements

None

Role Variables

Users

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: []

Example

 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'

Dependencies

None

Example Playbook

- hosts: all
  roles:
    - arillso.users

Author

Inspiration

License

This project is under the MIT License. See the LICENSE file for the full license text.

Copyright

(c) 2020, Arillso

About

This is an Ansible role which users and user's authorized keys manages.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published