Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samdoran/ansible-role-sudo
Ansible role to configure sudoers
https://github.com/samdoran/ansible-role-sudo
Last synced: 3 days ago
JSON representation
Ansible role to configure sudoers
- Host: GitHub
- URL: https://github.com/samdoran/ansible-role-sudo
- Owner: samdoran
- Created: 2020-08-06T19:53:23.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-06T20:37:32.000Z (almost 2 years ago)
- Last Synced: 2024-11-01T09:14:32.634Z (about 2 months ago)
- Language: Jinja
- Size: 15.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
sudo
=========
[![Galaxy](https://img.shields.io/badge/galaxy-samdoran.sudo-blue.svg?style=flat)](https://galaxy.ansible.com/samdoran/sudo)Setup basic `sudo` configuration to allow passwordless `sudo` and not require a TTY. This is mainly needed on new hosts to get them in a state to be managed by Ansible.
Requirements
------------None.
Role Variables
--------------| Name | Default Value | Description |
|-------------------|---------------------|----------------------|
| `sudo_package_name` | `sudo` | Name of `sudo` package to install. |
| `sudo_owner` | `root` | User that owns the `sudoers` files. |
| `sudo_group` | `group` | Group that owns the `sudoers` files. |
| `sudo_default_options` | `ALL=(ALL) NOPASSWD: ALL` | Default options applied to `sudo_owners` and `sudo_groups` if per user or group options are not specified.|
| `sudo_sudoers_path` | `/etc/sudoers` | Path to `sudoers` file. |
| `sudo_sudoers_d_path` | `/etc/sudoers.d` | Path to `sudoers.d` directory. |
| `sudo_sudoers_lines` | `[see defaults/main.yml]` | Lines to insert in `/etc/sudoers`. By default, the lines inserted disable the requirement for a TTY and ensure the `sudo_sudoers_d_path` is read. |
| `sudo_users` | `[]` | List of users and their `sudo` options. If no `options` are specifid, `sudo_default_options` will be used. See `defaults/main.yml` for examples. |
| `sudo_groups` | `[]` | List of groups and their `sudo` options. If no `options` are specifid, `sudo_default_options` will be used. If the group does not exist, it will be created. See ` defaults/main.yml` for examples. |
| `sudo_create_groups` | `yes` | Whether or not to create `sudo_groups`. |Dependencies
------------None.
Example Playbook
----------------- hosts: all
roles:
- samdoran.sudoLicense
-------Apache 2.0