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.
As per output from the
freeipa_host_add
I get the following in stdout (prettified):Issue 1: The record doesn't exist, this could be solved by adding a
freeipa_dnsrecord_add
just beforefreipa_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.