adambirds.configure-sshd

ansible-role-sshd

Configura sshd.

Requisitos

Ninguno

Variables del Rol

Variable Descripción Predeterminado
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 se guardan los archivos de configuración de sshd {{ __sshd_conf_dir }}
sshd_conf ruta al sshd_config {{ sshd_conf_dir }}/sshd_config
sshd_sftp_server ruta al 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 que 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 Predeterminado
__sshd_group ssh
__sshd_conf_dir /etc/ssh
__sshd_sftp_server /usr/lib/sftp-server
__sshd_service ssh

FreeBSD

Variable Predeterminado
__sshd_group sshd
__sshd_conf_dir /etc/ssh
__sshd_sftp_server /usr/libexec/sftp-server
__sshd_service sshd

OpenBSD

Variable Predeterminado
__sshd_group sshd
__sshd_conf_dir /etc/ssh
__sshd_sftp_server /usr/libexec/sftp-server
__sshd_service sshd

RedHat

Variable Predeterminado
__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 usar, copiar, modificar y distribuir este software para cualquier
propósito con o sin costo, siempre que la notificación de copyright anterior y este aviso de permiso aparezcan 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 
COMERCIABILIDAD Y ADECUACIÓN. EN NINGÚN CASO EL AUTOR SERÁ RESPONSABLE POR 
DAÑOS ESPECIALES, DIRECTOS, INDIRECTOS O CONSECUENTES, O CUALQUIER DAÑO
QUE SURJA DEL PÉRDIDA DE USO, DATOS O BENEFICIOS, YA SEA EN UNA ACCIÓN DE
CONTRATO, NEGLIGENCIA O CUALQUIER OTRA ACCIÓN TORTICERA, QUE SURJA DE O EN
CONEXIÓN CON EL USO O RENDIMIENTO DE ESTE SOFTWARE.

Información del Autor

Tomoyuki Sakurai tomoyukis@reallyenglish.com

Este README fue creado por ansible-role-init

Acerca del proyecto

Configures sshd

Instalar
ansible-galaxy install adambirds.configure-sshd
Licencia
isc
Descargas
84
Propietario
I am a Python and TypeScript Developer. Currently studying for a Computing & IT (Software) degree. Owner of @adb-web-designs and @VastDesk.