Fix regex patterns

This commit is contained in:
Danny Bessems 2021-06-15 11:11:56 +02:00
parent eca6ae515e
commit 10624f8c90
1 changed files with 2 additions and 2 deletions

View File

@ -16,8 +16,8 @@
line: "{{ item.line }}"
state: "{{ item.state }}"
loop:
- { regex: '$#PasswordAuthentication', line: 'PasswordAuthentication no', state: present}
- { regex: '$PasswordAuthentication yes', line: 'PasswordAuthentication yes', state: absent}
- { regex: '^#PasswordAuthentication', line: 'PasswordAuthentication no', state: present}
- { regex: '^PasswordAuthentication yes', line: 'PasswordAuthentication yes', state: absent}
- name: Delete 'ubuntu' user
ansible.builtin.user:
name: ubuntu