redbeard28.users
ANSIBLE-ROLE-USERS
This Ansible role is for creating users with SSH public keys.
NO PRIVATE KEY
If you want to create a group, please use the redbeard28.groups galaxy role for that.
How to use this role?
To use this role, you need to include it in a playbook.
Install this Galaxy role by running:
ansible-galaxy install -r requirements.yml
In your requirements.yml
file, include:
# Pulling from GitHub, overriding the name and specifying a version
- src: redbeard28.users
For more information, check the Ansible Docs.
Requirements
- Ansible version 2.9 or higher.
Role Variables
The state
variable tells Ansible if the user should be present or absent:
---
users:
- { state: 'present', name: 'myname', group: 'mygroup', password: {{ vault_password | password_hash('sha512') }}, key: {{ vault_ssh_pub_key }}, shell: '/bin/ksh', homepath: '/home' }
Dependencies
- The
redbeard28.groups
role if the group does not already exist.
Example Playbook
Here's an example of how to use this role, including variable parameters:
- hosts: all
roles:
- { role: redbeard28.users, tags: mytags }
Molecule Testing Framework
You can use Molecule to test this role:
image=debian tag="buster" molecule converge
image=debian tag="buster" molecule verify
Author Information
This role was created by Jeremie CUADRADO from Redbeard-Consulting. You can contact them at [email protected].
Informazioni sul progetto
Ansible role create users with ssh pub key. NO PRIVATE KEY
Installa
ansible-galaxy install redbeard28.users
Licenza
Unknown
Download
131
Proprietario