2020-01-22 22:42:51 +00:00
|
|
|
---
|
|
|
|
title: sudo
|
|
|
|
type: docs
|
|
|
|
---
|
|
|
|
|
2022-06-20 20:41:09 +00:00
|
|
|
[![Source Code](https://img.shields.io/badge/gitea-source%20code-blue?logo=gitea&logoColor=white)](https://gitea.rknet.org/ansible/xoxys.sudo) [![Build Status](https://img.shields.io/drone/build/ansible/xoxys.sudo?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/ansible/xoxys.sudo) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://gitea.rknet.org/ansible/xoxys.sudo/src/branch/main/LICENSE)
|
2020-01-31 10:44:50 +00:00
|
|
|
|
|
|
|
Configure sudoers environment.
|
2020-01-22 22:42:51 +00:00
|
|
|
|
2022-06-20 20:41:09 +00:00
|
|
|
<!--more-->
|
|
|
|
|
2022-03-03 20:34:44 +00:00
|
|
|
- [Default Variables](#default-variables)
|
|
|
|
- [sudo_aliases](#sudo_aliases)
|
|
|
|
- [sudo_env_keep](#sudo_env_keep)
|
2022-09-19 14:48:13 +00:00
|
|
|
- [sudo_logfile](#sudo_logfile)
|
2022-03-03 20:34:44 +00:00
|
|
|
- [sudo_misc_settings](#sudo_misc_settings)
|
|
|
|
- [sudo_packages](#sudo_packages)
|
|
|
|
- [sudo_secure_path](#sudo_secure_path)
|
|
|
|
- [Dependencies](#dependencies)
|
2020-01-22 22:42:51 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
## Default Variables
|
|
|
|
|
|
|
|
### sudo_aliases
|
|
|
|
|
|
|
|
#### Default value
|
|
|
|
|
|
|
|
```YAML
|
|
|
|
sudo_aliases: []
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Example usage
|
|
|
|
|
|
|
|
```YAML
|
|
|
|
sudo_aliases:
|
|
|
|
- name: os_admin
|
|
|
|
user_aliases:
|
|
|
|
- name: admins
|
|
|
|
value:
|
|
|
|
- my_admin
|
|
|
|
cmnd_aliases:
|
|
|
|
- name:
|
|
|
|
value:
|
|
|
|
specs:
|
|
|
|
- ADMINS ALL= NOPASSWD:ALL
|
|
|
|
```
|
|
|
|
|
|
|
|
### sudo_env_keep
|
|
|
|
|
|
|
|
#### Default value
|
|
|
|
|
|
|
|
```YAML
|
|
|
|
sudo_env_keep:
|
|
|
|
- COLORS
|
|
|
|
- DISPLAY
|
|
|
|
- HOSTNAME
|
|
|
|
- HISTSIZE
|
|
|
|
- INPUTRC
|
|
|
|
- KDEDIR
|
|
|
|
- LS_COLORS
|
|
|
|
- MAIL
|
|
|
|
- PS1
|
|
|
|
- PS2
|
|
|
|
- QTDIR
|
|
|
|
- USERNAME
|
|
|
|
- LANG
|
|
|
|
- LC_ADDRESS
|
|
|
|
- LC_CTYPE
|
|
|
|
- LC_COLLATE
|
|
|
|
- LC_IDENTIFICATION
|
|
|
|
- LC_MEASUREMENT
|
|
|
|
- LC_MESSAGES
|
|
|
|
- LC_MONETARY
|
|
|
|
- LC_NAME
|
|
|
|
- LC_NUMERIC
|
|
|
|
- LC_PAPER
|
|
|
|
- LC_TELEPHONE
|
|
|
|
- LC_TIME
|
|
|
|
- LC_ALL
|
|
|
|
- LANGUAGE
|
|
|
|
- LINGUAS
|
|
|
|
- _XKB_CHARSET
|
|
|
|
- XAUTHORITY
|
|
|
|
```
|
|
|
|
|
2022-09-19 14:48:13 +00:00
|
|
|
### sudo_logfile
|
|
|
|
|
|
|
|
#### Default value
|
|
|
|
|
|
|
|
```YAML
|
|
|
|
sudo_logfile: /var/log/sudo.log
|
|
|
|
```
|
|
|
|
|
2020-01-22 22:42:51 +00:00
|
|
|
### sudo_misc_settings
|
|
|
|
|
|
|
|
#### Default value
|
|
|
|
|
|
|
|
```YAML
|
|
|
|
sudo_misc_settings:
|
|
|
|
- '!visiblepw'
|
|
|
|
- always_set_home
|
|
|
|
- env_reset
|
|
|
|
```
|
|
|
|
|
|
|
|
### sudo_packages
|
|
|
|
|
|
|
|
#### Default value
|
|
|
|
|
|
|
|
```YAML
|
|
|
|
sudo_packages:
|
|
|
|
- sudo
|
|
|
|
```
|
|
|
|
|
|
|
|
### sudo_secure_path
|
|
|
|
|
|
|
|
#### Default value
|
|
|
|
|
|
|
|
```YAML
|
|
|
|
sudo_secure_path: /sbin:/bin:/usr/sbin:/usr/bin
|
|
|
|
```
|
|
|
|
|
2022-03-03 20:34:44 +00:00
|
|
|
|
|
|
|
|
2020-01-22 22:42:51 +00:00
|
|
|
## Dependencies
|
|
|
|
|
|
|
|
None.
|