No description
Find a file
semantic-release-bot 76c770d7c7 chore(release): 1.11.0 [skip ci]
# [1.11.0](https://github.com/de-it-krachten/ansible-role-openssh/compare/v1.10.0...v1.11.0) (2026-07-26)

### Bug Fixes

* Standarize vars.yml ([db33e32](db33e3237d))

### Features

* Add support for ansible-core 2.20+ ([b00f0f4](b00f0f441e))
* Added support for Fedora 44 ([0ff7b76](0ff7b76225))
* Added support for Ubuntu 26.04 LTS ([eca6609](eca6609ee9))
* Drop support for Fedora 42 ([4b15e5c](4b15e5c692))
2026-07-26 19:56:33 +00:00
.github/workflows Update CI 2026-07-23 14:54:12 +02:00
defaults fix: Update defaults to make them work 2024-12-18 20:38:13 +01:00
handlers feat: Move to FQCN 2022-10-09 21:33:10 +02:00
meta Update CI 2026-06-07 17:46:50 +02:00
molecule/default Update CI 2026-07-25 17:34:12 +02:00
tasks feat: Add support for ansible-core 2.20+ 2026-06-07 20:45:52 +02:00
.ansible-lint Update CI 2026-06-07 17:46:50 +02:00
.cicd Update CI 2026-06-09 11:12:15 +02:00
.cicd.overwrite Update CI 2026-03-14 19:48:49 +01:00
.collections feat: Add predefined set of KexAlgorithms 2024-02-10 12:01:52 +01:00
.gitignore feat: Update supported platforms & CI 2024-12-29 11:37:55 +01:00
.releaserc.yml Update CI 2026-03-06 22:56:34 +01:00
.roles feat: Update CI to latest standards 2022-10-09 23:50:27 +02:00
.yamllint fix: Update defaults to make them work 2024-12-18 20:38:13 +01:00
CHANGELOG.md chore(release): 1.11.0 [skip ci] 2026-07-26 19:56:33 +00:00
README.md Update CI 2026-06-07 17:46:50 +02:00

CI

ansible-role-openssh

Installs & manages OpenSSH

Dependencies

Roles

None

Collections

  • community.general

Platforms

Supported platforms

  • Red Hat Enterprise Linux 81
  • Red Hat Enterprise Linux 91
  • Red Hat Enterprise Linux 101
  • RockyLinux 8
  • RockyLinux 9
  • RockyLinux 10
  • OracleLinux 8
  • OracleLinux 9
  • OracleLinux 10
  • AlmaLinux 8
  • AlmaLinux 9
  • AlmaLinux 10
  • Debian 11 (Bullseye)
  • Debian 12 (Bookworm)
  • Debian 13 (Trixie)
  • Ubuntu 20.04 LTS
  • Ubuntu 22.04 LTS
  • Ubuntu 24.04 LTS
  • Ubuntu 26.04 LTS
  • Fedora 43
  • Fedora 441

Note: 1 : no automated testing is performed on these platforms

Role Variables

defaults/main.yml


# OpenSSH service
openssh_service: sshd

# Default OpensSH port
openssh_port: 22

# SELinux type
openssh_setype: ssh_port_t

# dict of key/values to be configured
openssh_daemon_options:
  - key: Port
    value: "{{ openssh_port }}"
  - key: Ciphers
    value: 'aes128-ctr,aes192-ctr,aes256-ctr'
    insertafter: "# Ciphers"
  - key: KexAlgorithms
    value: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
    insertafter: "# Ciphers"
  - key: PermitRootLogin
    value: 'no'

# Use predefined host keys
openssh_host_keys: []
# openssh_host_keys:
#   - files/openssh/host1/ssh_host_dsa_key
#   - files/openssh/host1/ssh_host_dsa_key.pub
#   - files/openssh/host1/ssh_host_ecdsa_key
#   - files/openssh/host1/ssh_host_ecdsa_key.pub
#   - files/openssh/host1/ssh_host_ed25519_key
#   - files/openssh/host1/ssh_host_ed25519_key.pub
#   - files/openssh/host1/ssh_host_rsa_key
#   - files/openssh/host1/ssh_host_rsa_key.pub

defaults/family-Debian.yml


# list of packages
openssh_packages:
  - openssh-server
  - openssh-client

# ssh-server config file
opensshd_config: /etc/ssh/sshd_config

defaults/family-RedHat.yml


# list of packages
openssh_packages:
  - openssh
  - openssh-server
  - openssh-clients

# ssh-server config file
opensshd_config: /etc/ssh/sshd_config

defaults/family-Suse.yml


# list of packages
openssh_packages:
  - openssh
  - openssh-server
  - openssh-clients

# ssh-server config file
opensshd_config: /etc/ssh/sshd_config

defaults/Ubuntu-24.yml


# OpenSSH service
openssh_service: ssh

Example Playbook

molecule/default/converge.yml


- name: sample playbook for role 'openssh'
  hosts: all
  become: 'yes'
  vars:
    molecule_driver: '{{ lookup(''env'', ''MOLECULE_DRIVER_NAME'') }}'
    openssh_port: 2222
  tasks:
    - name: Include role 'openssh'
      ansible.builtin.include_role:
        name: openssh