Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/artcom/ansible-role-user
Ansible role to configure a Linux user
https://github.com/artcom/ansible-role-user
Last synced: about 2 months ago
JSON representation
Ansible role to configure a Linux user
- Host: GitHub
- URL: https://github.com/artcom/ansible-role-user
- Owner: artcom
- License: mit
- Created: 2021-09-28T06:38:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-22T07:15:30.000Z (4 months ago)
- Last Synced: 2024-11-07T06:36:18.283Z (3 months ago)
- Language: Python
- Size: 19.5 KB
- Stars: 0
- Watchers: 12
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# User
Ansible role for configuring a user# Requirements
* [check-required-variables](https://github.com/artcom/ansible-role-check-required-variables)## Role Variables
Available variables are listed below, along with default values `(see defaults/main.yml)`:
```yaml
user_name: null
user_password: null
user_passwordless_sudo: true
user_authorized_keys: {}
```Required variables (role will fail if the variables are not set):
```yaml
user_name: "string"
```The user is created with given password, home folder and bash shell. User is added to sudo group and passwordless sudo is configured for that user. Public keys in `user_authorized_keys` are written to user's `~/.ssh/authorized_keys`.
## Test
### Requirements
- python >= 3.7
- docker### Run
```bash
pip install -r requirements.txt
molecule test
```