adambirds.configure-sshd

ansible-role-sshd

Configurer sshd.

Exigences

Aucune

Variables de rôle

Variable Description Par défaut
sshd_user nom de l'utilisateur de sshd sshd
sshd_group nom du groupe de sshd {{ __sshd_group }}
sshd_service nom du service de sshd {{ __sshd_service }}
sshd_conf_dir chemin vers le répertoire où sont conservés les fichiers de configuration de sshd {{ __sshd_conf_dir }}
sshd_conf chemin vers sshd_config {{ sshd_conf_dir }}/sshd_config
sshd_sftp_server chemin vers sftp-server(8) {{ __sshd_sftp_server }}
sshd_config dictionnaire de sshd_config {"PermitRootLogin"=>"without-password", "PasswordAuthentication"=>"no", "UseDNS"=>"no", "UsePAM"=>"no", "Subsystem"=>"sftp {{ sshd_sftp_server }}"}
sshd_config_pre chaîne de caractères de sshd_config(5) avant sshd_config ""
sshd_config_post chaîne de caractères de sshd_config(5) après sshd_config ""
sshd_config_match liste des mots clés Match. voir ci-dessous []

ssh_config_match

Cette variable est une liste de dictionnaires, créant des blocs Match.

Clé valeur
condition condition du Match
keyword dictionnaire de directives et paires de valeurs

Un exemple :

sshd_config_match:
  - condition: User foo
    keyword:
      X11Forwarding: "yes"

Ce qui génère un bloc :

Match User foo
  X11Forwarding yes

Debian

Variable Par défaut
__sshd_group ssh
__sshd_conf_dir /etc/ssh
__sshd_sftp_server /usr/lib/sftp-server
__sshd_service ssh

FreeBSD

Variable Par défaut
__sshd_group sshd
__sshd_conf_dir /etc/ssh
__sshd_sftp_server /usr/libexec/sftp-server
__sshd_service sshd

OpenBSD

Variable Par défaut
__sshd_group sshd
__sshd_conf_dir /etc/ssh
__sshd_sftp_server /usr/libexec/sftp-server
__sshd_service sshd

RedHat

Variable Par défaut
__sshd_group ssh
__sshd_conf_dir /etc/ssh
__sshd_sftp_server /usr/lib/sftp-server
__sshd_service sshd.service

Dépendances

Aucune

Exemple 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

Licence

Copyright (c) 2016 Tomoyuki Sakurai <[email protected]>

La permission d'utiliser, de copier, de modifier et de distribuer ce logiciel pour tout
but, avec ou sans frais, est par la présente accordée, à condition que l'avis de
droit d'auteur ci-dessus et cet avis de permission apparaissent dans toutes les copies.

LE LOGICIEL EST FOURNI "TEL QUEL" ET L'AUTEUR DÉCLINE TOUTES GARANTIES
CONCERNANT CE LOGICIEL, Y COMPRIS TOUTES GARANTIES IMPLICITES DE
COMMERCIALISATION ET D'ADÉQUATION. EN AUCUN CAS, L'AUTEUR NE PEUT ÊTRE TENU RESPONSABLE DES DOMMAGES SPÉCIAUX, DIRECTS, INDIRECTS OU CONSÉCUTIFS OU DE TOUT DOMMAGE
ÉVENTUEL RÉSULTANT D'UNE PERTE D'UTILISATION, DE DONNÉES OU DE PROFITS, QUE CE SOIT DANS
LE CADRE D'UN CONTRAT, D'UNE NÉGLIGENCE OU D'AUTRE ACTION TOUTE FAITE, DÉCOULANT DE OU EN LIEN AVEC L'UTILISATION OU LA PERFORMANCE DE CE LOGICIEL.

Informations sur l'auteur

Tomoyuki Sakurai tomoyukis@reallyenglish.com

Ce README a été créé par ansible-role-init

À propos du projet

Configures sshd

Installer
ansible-galaxy install adambirds.configure-sshd
Licence
isc
Téléchargements
84
Propriétaire
I am a Python and TypeScript Developer. Currently studying for a Computing & IT (Software) degree. Owner of @adb-web-designs and @VastDesk.