Linting fixes

This commit is contained in:
Matt Willsher 2022-09-07 09:33:33 +01:00
parent ac6dcd0cfc
commit abe2b26a89
2 changed files with 4 additions and 5 deletions

View file

@ -61,7 +61,7 @@
{{ __sshd_verify_hostkeys_default | to_json }}
{% endif %}
{% elif __sshd_hostkeys_from_config | from_json is string %}
{{ [ __sshd_hostkeys_from_config | from_json ] | to_json }}
{{ [__sshd_hostkeys_from_config | from_json] | to_json }}
{% else %}
{{ __sshd_hostkeys_from_config }}
{% endif %}
@ -70,7 +70,6 @@
{% endif %}
block:
- name: Make sure hostkeys are available
# noqa var-spacing
ansible.builtin.shell: |
set -eu
if set -o | grep pipefail 2>&1 /dev/null ; then
@ -130,7 +129,7 @@
when: sshd_config_namespace is not none
rescue:
- name: re-raise the error
- name: Re-raise the error
ansible.builtin.fail:
msg: "{{ ansible_failed_result }}"
always:

View file

@ -25,7 +25,7 @@
group: root
mode: "0644"
notify: reload_sshd
when: sshd_install_service|bool
when: sshd_install_service | bool
- name: Service enabled and running
ansible.builtin.service:
@ -39,7 +39,7 @@
# Due to ansible bug 21026, cannot use service module on RHEL 7
- name: Enable service in chroot
ansible.builtin.command: systemctl enable {{ sshd_service }} # noqa 303
ansible.builtin.command: systemctl enable {{ sshd_service }} # noqa command-instead-of-module
when:
- ansible_connection == 'chroot'
- ansible_os_family == 'RedHat'