Open ikke-t opened 2 years ago
I don't also get what's the purpose os action variable. What is it used for? The module documentation miss an example for it.
This got solved. It's the case of this module failing if there is no keytab at the idm server. So my kerberos ticket for admin had expired at idm. I didn't know this module depends on it, especially while it knows the ipaadmin_password.
I think there would be two fixes:
This is the temporary fix I got tipped:
- name: Ensure admin keytab is valid
shell: "echo {{ ipaadmin_password }} | kinit admin"
naturally the option 2 would be the preferred way. Or at least to have a proper warning about kerberos ticket expiry, where as now I thought its about user password.
@ikke-t, it seem you are missing ipaadmin_password
in the task (and, optionally ipaadmin_principal
, which defaults to admin
). With the password in place, the module use GSSAPI to authenticate. All examples in the README have this option set, and both variables are explained on it.
By default, an existing TGT will be used, if not, authentication will be performed with the provided credentials.
No I do not. It comes from vault. See how I use it now with kinit above. And principal is the default, admin.
If there is no valid credential, then there is a kinit call internally. The test before using kinit is failing with the error "The password is not set" if the password is not set.
If you are using kinit admin
on the server is it asking for a new admin password?
Using the module depends on either having valid credentials or providing ipaadmin_password
for the module task.
Just to verify I need
ipauser:
ipaadmin_password: "{{ ipaadmin_password }}"
@ikke-t either that or a valid TGT on the target host.
I'm just a bit surpriced why doesn't it pick it from the host variables. I have verified with debug it is set correctly in the playbook.
Maybe the same issue: I would like to use ipauser with my Kerberos credentials from login. When system login creates a credential cache and sets KRB5CCNAME environment variable, everything works as expected. When system login creates a default credential cache and does not set KRB5CCNAME, ipauser fails with "The password is not set". (Using ansible-freeipa-0.3.8-1.el8.noarch)
I've stumbled upon the same problem. It looks like I need to set ipaadmin_password: "{{ ipaadmin_password }}"
in every tasks' parameters.
Why isn't the password (and I suppose the principal, too) picked up from the host variables automatically?
When I try running the playbook after a user is already once created (re-running), the ipauser tasks always fails with
This is the task:
Why can't I rerun it?