An ansible role to enable socket-activation of the SSH server. Port 22 (or whatever) will be listening, but the SSH server will not start until a client connects, speeding boot time and reducing memory used.
After running this role socket-activation is enabled but not running, and the old SSH service is disabled but still running, so you must reboot to complete the switch.
(You are probably connected to the machine via SSH and stopping the SSH service would kill ansible's connection. This wouldn't have been a problem in the olden days, but modern systemd efficiently kills all the processes asscoiated with the SSH service, including active connections).
---
- hosts: localhost
roles:
- groks.sshd-socket-activation
An installation of Fedora, RedHat, CentOS etc.
None.
None.
BSD