reallyenglish.sshd
ansible-role-sshd
Configurer sshd.
Exigences
Aucune
Variables du rôle
Variable | Description | Par défaut |
---|---|---|
sshd_user |
nom d'utilisateur de sshd |
sshd |
sshd_group |
nom de groupe de sshd |
{{ __sshd_group }} |
sshd_service |
nom du service sshd |
{{ __sshd_service }} |
sshd_conf_dir |
chemin vers le répertoire des 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 pour sshd_config |
{"PermitRootLogin"=>"without-password", "PasswordAuthentication"=>"no", "UseDNS"=>"no", "UsePAM"=>"no", "Subsystem"=>"sftp {{ sshd_sftp_server }}"} |
sshd_config_pre |
chaîne de caractères avant sshd_config |
"" |
sshd_config_post |
chaîne de caractères après sshd_config |
"" |
sshd_config_match |
liste de 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 directrices 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]>
Permission de utiliser, copier, modifier et distribuer ce logiciel pour n'importe quel
but avec ou sans frais est par la présente accordée, à condition que l'avis de copyright ci-dessus
et cet avis de permission apparaissent dans toutes les copies.
LE LOGICIEL EST FOURNI "EN L'ÉTAT" ET L'AUTEUR DÉCLINE TOUTE GARANTIE
CONCERNANT CE LOGICIEL, Y COMPRIS TOUTES GARANTIES IMPLICITES DE
COMMERCIALITÉ ET D'ADAPTATION À UN USAGE PARTICULIER. EN AUCUN CAS L'AUTEUR NE PEUT ÊTRE TENU RESPONSABLE DE
QUELQUES DOMMAGES SPÉCIAUX, DIRECTS, INDIRECTS OU CONSÉCUTIFS OU DE QUELQUES DOMMAGES
CONSTITUÉS PAR UNE PERTE D'UTILISATION, DE DONNÉES OU DE PROFITS, QUE CE SOIT DANS UNE
ACTION EN CONTRAT, DE NEGLIGENCE OU AUTRE ACTION DÉLICTUELLE, DÉCOULANT DE OU EN RAPPORT 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