Skip to content
Snippets Groups Projects
Name Last commit Last update
defaults
handlers
meta
tasks
templates
vars
README.md

sshd

Configure ssh service.

Requirements

Ubuntu 18.04 CentOS 7

Role Variables

sshd_state:
  What state the sshd service should be in (default: started)
sshd_enabled:
  Start the SSH daemon at boot (default: true)
sshd_config_owner:
  File ownership of sshd configuration file (default: root)
sshd_config_group:
  Group ownership of sshd configuration file (default: root)
sshd_config_mode:
  File permission of sshd configuration file (default: 0600)
sshd_config_file:
  Full path to default sshd configuration file (default: /etc/ssh/sshd_config)
sshd_binary:
  Path to the sshd binary file (default: /usr/sbin/sshd)
sshd_service:
  Name of the ssh service (default: sshd)
sshd:
  Custom sshd configuration (default: none)
sshd_sftp_server:
  Path to sftp server (default: /usr/lib/openssh/sftp-server)

Dependencies

None

Example Playbook

- hosts: all
  roles:
     - { role: sshd }

Author Information

This role is based on https://github.com/willshersystems/ansible-sshd.