GROG.management-user
Management User
This is a role for managing a management user.
Requirements
- Hosts must be prepared for Ansible (must have Python and other dependencies)
- Root access is required (set
become: yes
) - The commands
useradd
,userdel
, andusermod
must be available on the host - Sudo must be enabled (note: this role will enable sudoers.d if it’s not already enabled)
Role Variables
Variable | Description | Default Value |
---|---|---|
management_user_list |
List of management users | [ management_user_settings ] |
management_user_list_host |
List of users for specific hosts | [] |
management_user_list_group |
List of users for specific groups | [] |
management_user_settings |
Default settings for the management user (see details below) | see details |
management_user_key |
SSH key for the default user settings | ~/.ssh/id_rsa.pub |
The lists management_user_list
, _list_host
, and _list_group
will be combined when managing the users. You can specify users for individual hosts or groups using these lists.
Details about management_user_settings
By default, a user with the following settings will be created:
management_user_key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
management_user_settings:
name: management
comment: Ansible
shell: '/bin/bash'
authorized_keys:
- key: "{{ management_user_key }}"
exclusive: yes
sudo:
hosts: ALL
as: ALL
commands: ALL
nopasswd: yes
If using the default settings, you can change the SSH key with the management_user_key
variable.
However, it is recommended to use your own custom user settings. More information about available options can be found in the documentation for the GROG user, authorized-key, and sudo roles.
Dependencies
Example Playbook
---
- hosts: all
roles:
- { role: GROG.management-user, become: yes }
Contributing
We welcome any help, changes, or ideas here!
Author
Created by G. Roggemans
License
MIT
Informazioni sul progetto
A role for managing a management user.
Installa
ansible-galaxy install GROG.management-user
Licenza
mit
Download
159.7k
Proprietario
Open Source Science and Technology