mirror of
https://github.com/willshersystems/ansible-sshd
synced 2024-11-22 19:10:18 +01:00
d438f096a7
For chroot connection (e.g. when building images instead of working on live hosts) one cannot restart services etc. Also due to Ansible bug 21026 one must run systemctl instead of using the service module, limiting support to EL 7 for the time being.
10 lines
248 B
YAML
10 lines
248 B
YAML
---
|
|
- name: Reload the SSH service
|
|
service:
|
|
name: "{{ sshd_service }}"
|
|
state: reloaded
|
|
when:
|
|
- sshd_allow_reload
|
|
- ansible_virtualization_type|default(None) != 'docker'
|
|
- ansible_connection != 'chroot'
|
|
listen: reload_sshd
|