Update configure_sshd.yml
notify:
- Restart sshd
when:
- - allow_deny == 'Allow'
+ - allow_deny == 'allow'
- file_content.stdout.find('AllowUsers') == -1
- name: Configure sshd_config file when DenyUsers entry not exists
notify:
- Restart sshd
when:
- - allow_deny == 'Deny'
+ - allow_deny == 'deny'
- file_content.stdout.find('DenyUsers') == -1
- name: Configure sshd_config file when AllowUsers entry exists
notify:
- Restart sshd
when:
- - allow_deny == 'Allow'
+ - allow_deny == 'allow'
- file_content.stdout.find('AllowUsers') != -1
- name: Configure sshd_config file when DenyUsers entry exists
notify:
- Restart sshd
when:
- - allow_deny == 'Deny'
+ - allow_deny == 'deny'
- file_content.stdout.find('DenyUsers') != -1
when: user | length > 1
