mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-06-11 19:25:54 +00:00
hbacrule: Create FQDN from single hostnames
Single hostnames can be used for hbacrule_add_host and will match fqdn in IPA internally. Simple host names have to be extended to be FQDN to be able to compare them for _host_add and _host_remove. Two new functions have been added to ansible_freeipa_module: - api_get_domain - Get the domain from the api - ensure_fqdn - Extend a single name with the domain This fixes #617 - hbacrule_add_host: already a member
This commit is contained in:
@@ -580,6 +580,28 @@
|
||||
register: result
|
||||
failed_when: result.changed or result.failed
|
||||
|
||||
# ENSURE SIMPLE HOSTNAMES MATCH
|
||||
|
||||
- name: Ensure HBAC rule hbacrule01 simple host members are usable
|
||||
ipahbacrule:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: hbacrule01
|
||||
host:
|
||||
- "testhost01"
|
||||
- "testhost03"
|
||||
register: result
|
||||
failed_when: not result.changed or result.failed
|
||||
|
||||
- name: Ensure HBAC rule hbacrule01 simple host members are usable again (and match)
|
||||
ipahbacrule:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: hbacrule01
|
||||
host:
|
||||
- "testhost01"
|
||||
- "testhost03"
|
||||
register: result
|
||||
failed_when: result.changed or result.failed
|
||||
|
||||
# CLEANUP TEST ITEMS
|
||||
|
||||
- name: Ensure test HBAC rule hbacrule01 is absent
|
||||
|
||||
Reference in New Issue
Block a user