From 246953ec24eaff55b8fcdbbd910409fb750e1f82 Mon Sep 17 00:00:00 2001 From: Sven Velt Date: Mon, 7 Mar 2022 19:37:51 +0100 Subject: [PATCH] Add var for ssh config file path (openSUSE Tumbleweed) --- create_inventory_lxc.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/create_inventory_lxc.yml b/create_inventory_lxc.yml index 4989914..4c639b3 100644 --- a/create_inventory_lxc.yml +++ b/create_inventory_lxc.yml @@ -48,6 +48,9 @@ opensuse: openssh voidlinux: openssh + ssh_config_filename: + opensuse-tumbleweed: /etc/ssh/sshd_config.d/permitrootlogin.conf + ssh_service_name: devuan: ssh @@ -140,9 +143,10 @@ - name: "Set «PermitRootLogin» to «yes»" lineinfile: - dest: /etc/ssh/sshd_config + dest: "{{ ssh_config_filename[os_d + '-' + os_r|string]|default('/etc/ssh/sshd_config') }}" regexp: '^#? *PermitRootLogin' line: "PermitRootLogin yes" + create: yes backup: yes notify: "Restart SSH"