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

View file

@ -25,7 +25,7 @@
group: root group: root
mode: "0644" mode: "0644"
notify: reload_sshd notify: reload_sshd
when: sshd_install_service|bool when: sshd_install_service | bool
- name: Service enabled and running - name: Service enabled and running
ansible.builtin.service: ansible.builtin.service:
@ -39,7 +39,7 @@
# Due to ansible bug 21026, cannot use service module on RHEL 7 # Due to ansible bug 21026, cannot use service module on RHEL 7
- name: Enable service in chroot - 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: when:
- ansible_connection == 'chroot' - ansible_connection == 'chroot'
- ansible_os_family == 'RedHat' - ansible_os_family == 'RedHat'