reallyenglish.sshd
ansible-role-sshd
Configurar sshd.
Requisitos
Ninguno
Variables del Rol
Variable | Descripción | Por Defecto |
---|---|---|
sshd_user |
nombre de usuario de sshd |
sshd |
sshd_group |
nombre del grupo de sshd |
{{ __sshd_group }} |
sshd_service |
nombre del servicio de sshd |
{{ __sshd_service }} |
sshd_conf_dir |
ruta al directorio donde están los archivos de configuración de sshd |
{{ __sshd_conf_dir }} |
sshd_conf |
ruta al archivo sshd_config |
{{ sshd_conf_dir }}/sshd_config |
sshd_sftp_server |
ruta a sftp-server(8) |
{{ __sshd_sftp_server }} |
sshd_config |
diccionario de sshd_config |
{"PermitRootLogin"=>"without-password", "PasswordAuthentication"=>"no", "UseDNS"=>"no", "UsePAM"=>"no", "Subsystem"=>"sftp {{ sshd_sftp_server }}"} |
sshd_config_pre |
cadena de sshd_config(5) antes de sshd_config |
"" |
sshd_config_post |
cadena de sshd_config(5) después de sshd_config |
"" |
sshd_config_match |
lista de la palabra clave Match . ver abajo |
[] |
ssh_config_match
Esta variable es una lista de diccionarios, crea bloques Match
.
Clave | Valor |
---|---|
condition |
condición del Match |
keyword |
diccionario de directivas y pares de valores |
Un ejemplo:
sshd_config_match:
- condition: User foo
keyword:
X11Forwarding: "yes"
Lo que genera un bloque:
Match User foo
X11Forwarding yes
Debian
Variable | Por Defecto |
---|---|
__sshd_group |
ssh |
__sshd_conf_dir |
/etc/ssh |
__sshd_sftp_server |
/usr/lib/sftp-server |
__sshd_service |
ssh |
FreeBSD
Variable | Por Defecto |
---|---|
__sshd_group |
sshd |
__sshd_conf_dir |
/etc/ssh |
__sshd_sftp_server |
/usr/libexec/sftp-server |
__sshd_service |
sshd |
OpenBSD
Variable | Por Defecto |
---|---|
__sshd_group |
sshd |
__sshd_conf_dir |
/etc/ssh |
__sshd_sftp_server |
/usr/libexec/sftp-server |
__sshd_service |
sshd |
RedHat
Variable | Por Defecto |
---|---|
__sshd_group |
ssh |
__sshd_conf_dir |
/etc/ssh |
__sshd_sftp_server |
/usr/lib/sftp-server |
__sshd_service |
sshd.service |
Dependencias
Ninguna
Ejemplo de Playbook
- hosts: localhost
roles:
- ansible-role-sshd
vars:
sshd_config:
PermitRootLogin: without-password
PasswordAuthentication: "no"
Port: 22
UseDNS: "no"
UsePAM: "no"
Subsystem: "sftp {{ sshd_sftp_server }}"
sshd_config_match:
- condition: User foo
keyword:
X11Forwarding: "yes"
- condition: User bar
keyword:
X11Forwarding: "no"
sshd_config_pre: |
Port 2022
sshd_config_post: |
Match Address 192.168.1.1
PasswordAuthentication yes
Licencia
Copyright (c) 2016 Tomoyuki Sakurai <[email protected]>
Se concede permiso para utilizar, copiar, modificar y distribuir este software para cualquier propósito, con o sin cargo, siempre que se incluya el aviso de copyright anterior y este aviso de permiso en todas las copias.
EL SOFTWARE SE PROPORCIONA "TAL CUAL" Y EL AUTOR RENUNCIA A TODAS LAS GARANTÍAS CON RESPECTO A ESTE SOFTWARE, INCLUYENDO TODAS LAS GARANTÍAS IMPLÍCITAS DE COMERCIALIZACIÓN Y ADECUACIÓN. EN NINGÚN CASO EL AUTOR SERÁ RESPONSABLE DE NINGÚN DAÑO ESPECIAL, DIRECTO, INDIRECTO O CONSECUENCIAL, NI DE NINGÚN DAÑO RESULTANTE DE LA PÉRDIDA DE USO, DATOS O BENEFICIOS, YA SEA EN UNA ACCIÓN DE CONTRATO, NEGLIGENCIA O CUALQUIER OTRA ACCIÓN TORTUOSA, QUE SURJA O ESTÉ EN CONEXIÓN CON EL USO O EL RENDIMIENTO DE ESTE SOFTWARE.
Información del Autor
Tomoyuki Sakurai tomoyukis@reallyenglish.com
Este README fue creado por ansible-role-init
Instalar
ansible-galaxy install reallyenglish.sshd
Licencia
isc
Descargas
10.1k
Propietario