diff --git a/slococo/playground/roles/ssh_config/tasks/main.yml b/slococo/playground/roles/ssh_config/tasks/main.yml index 9dad7fc..9ab86e3 100644 --- a/slococo/playground/roles/ssh_config/tasks/main.yml +++ b/slococo/playground/roles/ssh_config/tasks/main.yml @@ -2,10 +2,10 @@ - name: Check SSH daemon configuration ansible.builtin.lineinfile: path: /etc/ssh/sshd_config - regexp: "[^#]{{ item.key }}.*" + regexp: "^{{ item.key }}" line: "{{ item.key }} {{ item.value }}" state: present validate: "sshd -t -f %s" mode: 0644 loop: "{{ sshd_options | dict2items }}" - become: true + become: true \ No newline at end of file