ipahost: Add support for 'passkey' in 'auth_ind'

The value 'passkey' was missing as a valid value for auth_ind attribute.

Signed-off-by: Rafael Guterres Jeffman <rjeffman@redhat.com>
This commit is contained in:
Rafael Guterres Jeffman
2025-07-04 17:59:05 -03:00
parent a733c031b0
commit 1488fb7b5e
3 changed files with 40 additions and 4 deletions

View File

@@ -5,6 +5,9 @@
gather_facts: yes
tasks:
- name: Include FreeIPA facts.
ansible.builtin.include_tasks: ../env_freeipa_facts.yml
- name: Get Domain from server name
ansible.builtin.set_fact:
ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}"
@@ -58,6 +61,39 @@
register: result
failed_when: result.changed or result.failed
- name: Ensure host "{{ host1_fqdn }}" present with auth_ind passkey
ipahost:
ipaadmin_password: SomeADMINpassword
ipaapi_context: "{{ ipa_context | default(omit) }}"
name: "{{ host1_fqdn }}"
auth_ind:
- passkey
register: result
when: passkey_is_supported
failed_when: not result.changed or result.failed
- name: Ensure host "{{ host1_fqdn }}" present with auth_ind passkey, again
ipahost:
ipaadmin_password: SomeADMINpassword
ipaapi_context: "{{ ipa_context | default(omit) }}"
name: "{{ host1_fqdn }}"
auth_ind:
- passkey
register: result
when: passkey_is_supported
failed_when: result.changed or result.failed
- name: Check if correct message is given if passkey is not supported.
ipahost:
ipaadmin_password: SomeADMINpassword
ipaapi_context: "{{ ipa_context | default(omit) }}"
name: "{{ host1_fqdn }}"
auth_ind:
- passkey
register: result
when: not passkey_is_supported
failed_when: not result.failed or "'passkey' is not supported" not in result.msg
- name: Ensure host "{{ host1_fqdn }}" present with empty auth_ind
ipahost:
ipaadmin_password: SomeADMINpassword