https://github.com/antmelekhin/ansible-role-openssh
An Ansible role to configure the OpenSSH server and client.
https://github.com/antmelekhin/ansible-role-openssh
ansible ansible-role linux openssh-client openssh-server windows
Last synced: 2 months ago
JSON representation
An Ansible role to configure the OpenSSH server and client.
- Host: GitHub
- URL: https://github.com/antmelekhin/ansible-role-openssh
- Owner: antmelekhin
- License: mit
- Created: 2020-10-17T12:44:56.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-12-08T11:21:01.000Z (over 1 year ago)
- Last Synced: 2025-01-30T06:29:32.463Z (over 1 year ago)
- Topics: ansible, ansible-role, linux, openssh-client, openssh-server, windows
- Language: Jinja
- Homepage: https://galaxy.ansible.com/ui/standalone/roles/antmelekhin/openssh/
- Size: 85.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
OpenSSH
=======
An Ansible role to configure the OpenSSH server and client.
Requirements
------------
- Supported version of Ansible: 2.12 and higher. Systems with Python versions below than 3.7 are not compatible with ansible-core 2.17 (see [ansible/ansible#83357](https://github.com/ansible/ansible/issues/83357#issuecomment-2150254754)).
- `pywinrm` is a python library for connection Ansible to Windows hosts via [WinRM](https://docs.ansible.com/ansible/latest/user_guide/windows_winrm.html).
- Supported platforms:
- Amazon Linux
- 2
- 2023
- Debian
- 10
- 11
- 12
- Fedora
- 39
- 40
- RHEL
- 7
- 8
- 9
- Ubuntu
- 18.04
- 20.04
- 22.04
- 24.04
- Windows
- 2019
Role Variables
--------------
All variables that can be overridden are stored in the [defaults/main.yml](https://github.com/antmelekhin/ansible-role-openssh/blob/main/defaults/main.yml) file.
Please refer to the [meta/argument_specs.yml](https://github.com/antmelekhin/ansible-role-openssh/blob/main/meta/argument_specs.yml) file for a description of the available variables.
Similarly, descriptions and defaults for preset variables can be found in the [vars/main.yml](https://github.com/antmelekhin/ansible-role-openssh/blob/main/vars/main.yml) file.
Dependencies
------------
When using Ansible core, you will also need to install the following Ansible collections:
```yaml
---
collections:
- name: community.general
- name: community.windows
```
Example Playbook
----------------
Configure OpenSSH server and enable single sign-on.
```yaml
---
- name: 'Setup OpenSSH'
hosts: all
roles:
- role: 'antmelekhin.openssh'
openssh_sshd_password_authentication: true
openssh_sshd_gssapi_authentication: true
```
Configure OpenSSH server and enable single sign-on for server_admins group.
```yaml
---
- name: 'Setup OpenSSH'
hosts: all
roles:
- role: 'antmelekhin.openssh'
openssh_sshd_match:
- type: 'Group'
name: 'server_admins'
config:
PasswordAuthentication: 'yes'
GSSAPIAuthentication: 'yes'
```
License
-------
MIT
Author Information
------------------
Melekhin Anton.