Enrolling client fails due to missing records
p3lim opened this issue · 2 comments
p3lim commented
As per output from the freeipa_host_add
I get the following in stdout (prettified):
{
"result": null,
"error": {
"code": 4019,
"message": "Host 'test.example.com' does not have corresponding DNS A/AAAA record",
"data": {
"hostname": "test.example.com"
},
"name": "DNSNotARecordError"
},
"id": 0,
"principal": "enroller@EXAMPLE.COM",
"version": "4.9.2"
}
Issue 1: The record doesn't exist, this could be solved by adding a freeipa_dnsrecord_add
just before freipa_host_add
that creates the A/AAAA record for the host.
Issue 2: The states continue to run, since curl doesn't return non-null it never fails. Could probably be solved by using the http module instead of cmd.run and curl.
I wanted your input on this before I create more PRs.
fpytloun commented
I am no longer using FreeIPA in my deployments so I am not sure. Anyway I will be happy to merge your MRs 👍