You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My task definition (below) is itself included via include_tasks, because I'm using another pre-canned playbook for the system:
- name: Move sshd to port 222include_role:
name: willshersystems.sshdvars:
sshd_Port: 222sshd_manage_service: truesshd_allow_reload: true
When running the playbook, I can see it's updated the config successfully (in /etc/ssh/sshd_config.d/00-ansible_system_role.conf), but ss -tnl still shows sshd listening on [::]:22.
The Ansible debugging output seems to indicate that it's tried to validate the new config, and then start sshd if it wasn't already running (which is a no-op), but config changes don't seem to trigger Reload_sshd at all.
I've worked around this in my task definition by adding another step to manually reload sshd:
When using this module via
include_role
on an Ubuntu 20.04.6 target, SSH is not automatically reloaded on config change.This is because of an Ansible limitation: ansible/ansible#26537 ansible/proposals#136
My task definition (below) is itself included via
include_tasks
, because I'm using another pre-canned playbook for the system:When running the playbook, I can see it's updated the config successfully (in
/etc/ssh/sshd_config.d/00-ansible_system_role.conf
), butss -tnl
still showssshd
listening on[::]:22
.The Ansible debugging output seems to indicate that it's tried to validate the new config, and then start
sshd
if it wasn't already running (which is a no-op), but config changes don't seem to triggerReload_sshd
at all.I've worked around this in my task definition by adding another step to manually reload
sshd
:Expected behaviour
include_role
Versions
The text was updated successfully, but these errors were encountered: