mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-30 03:14:42 +00:00
ipaconfig: Validate emaildomain
When setting the default email domain, there was no validation on the provide value. Using ipapython.validate.Email applies the same validation method as implemented in IPA. Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
This commit is contained in:
@@ -34,6 +34,16 @@
|
||||
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
||||
emaildomain: ipa.test
|
||||
|
||||
- name: Ensure the default e-mail domain cannot be set to an invalid email domain.
|
||||
ipaconfig:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
||||
emaildomain: invalid@emaildomain
|
||||
register: invalid_emaildomain
|
||||
failed_when:
|
||||
invalid_emaildomain.changed
|
||||
or not (invalid_emaildomain.failed and "Invalid 'emaildomain' value:" in invalid_emaildomain.msg)
|
||||
|
||||
- name: Set default shell to '/bin/sh'
|
||||
ipaconfig:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
|
||||
Reference in New Issue
Block a user