Fix regexp bug
This commit is contained in:
parent
37af9bd7ed
commit
6a91dfcfe4
|
@ -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
|
Loading…
Reference in New Issue