Skip to content
This repository was archived by the owner on Dec 26, 2020. It is now read-only.

Commit aeb61c7

Browse files
Sebastian GumprichSebastian Gumprich
Sebastian Gumprich
authored and
Sebastian Gumprich
committed
more bools
1 parent 6c39725 commit aeb61c7

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Diff for: handlers/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
- name: restart sshd
22
service: name={{ sshd_service_name }} state=restarted
3-
when: "ssh_server_enabled"
3+
when: "(ssh_server_enabled|bool)"

Diff for: templates/opensshd.conf.j2

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
# ===================
88

99
# Either disable or only allowssh root login via certificates.
10-
PermitRootLogin {% if (ssh_allow_root_with_key|bool) %} without-password {% else %} no {% endif %}
11-
#PermitRootLogin {{ 'without-password' if ssh_allow_root_with_key else 'no' | bool }}
10+
PermitRootLogin {{ 'without-password' if (ssh_allow_root_with_key|bool) else 'no' }}
1211

1312
# Define which port sshd should listen to. Default to `22`.
1413
{% for port in ssh_server_ports -%}

0 commit comments

Comments
 (0)