arthurfelipems.adduser_gitkeys
adduser_gitkeys
This is for managing GNU/Linux users and their SSH keys from GitHub or GitLab.
Requirements
No special requirements needed.
Role Variables
Here are the variables you can use, including those from defaults/main.yml and vars/main.yml:
git_repository_url: https://github.com
This is the URL of the repository where the keys will be fetched.
- { username: "anakin.skywalker", gituser: "anakinskywalker", user_groups: "wheel" }
- { username: "luke.skywalker", gituser: "lukeskywalker", user_groups: ["wheel", "adm"] }
This list includes the details for creating users. The only mandatory field is the username.
Use the gituser parameter if the Linux username differs from the GitHub username.
The user_groups parameter adds the Linux user to specified groups. This value can be a single string or a list.
Note: The group must already exist before you assign the user to it.
Dependencies
None.
Example Playbook
This role is meant to be used in a loop, as shown below:
- hosts: all
become: true
tasks:
- name: Create Users
include_role:
name: arthurfelipems.adduser_gitkeys
loop:
- { username: "anakin.skywalker", gituser: "anakinskywalker", user_groups: "wheel" }
- { username: "luke.skywalker", gituser: "lukeskywalker", user_groups: ["wheel", "adm"] }
License
MIT License
Author Information
This role was created by Arthur Silva in 2019.
Informazioni sul progetto
GNU/Linux users and SSH-Keys from github/gitlab user keys.
Installa
ansible-galaxy install arthurfelipems.adduser_gitkeys
Licenza
mit
Download
73
Proprietario