mirror of
https://github.com/willshersystems/ansible-sshd
synced 2024-11-24 12:00:19 +01:00
d4eae954c1
* feat: Add support for Ubuntu Nobel/24.04 LTS * fix: Add missing PrintMotd to Ubuntu 22.04 * fix(tests): Various linting fixes --------- Co-authored-by: Jakub Jelen <jjelen@redhat.com>
24 lines
834 B
YAML
24 lines
834 B
YAML
---
|
|
- name: Update configuration file snippet
|
|
vars:
|
|
sshd_skip_defaults: true
|
|
ansible.builtin.blockinfile:
|
|
path: "{{ sshd_config_file }}"
|
|
owner: "{{ sshd_config_owner }}"
|
|
group: "{{ sshd_config_group }}"
|
|
mode: "{{ sshd_config_mode }}"
|
|
block: |
|
|
{{ __sshd_compat_match_all }}
|
|
{{ lookup('template', 'sshd_config_snippet.j2') }}
|
|
create: true
|
|
marker: "# {mark} sshd system role managed block: namespace {{ sshd_config_namespace }}"
|
|
validate: >-
|
|
{% if not __sshd_supports_validate %}
|
|
true %s
|
|
{% elif sshd_test_hostkey is defined and sshd_test_hostkey.path is defined %}
|
|
{{ sshd_binary }} -t -f %s -h {{ sshd_test_hostkey.path }}/rsa_key
|
|
{% else %}
|
|
{{ sshd_binary }} -t -f %s
|
|
{% endif %}
|
|
backup: "{{ sshd_backup }}"
|
|
notify: Reload_sshd
|