I have over come the issue by adding Ansible Sleep task in-between create TXT and Validate TXT. It works.
But the thing is, Its works only with Common Name not when i add SAN (subject_alternative_name)
Finally, I have tried with all 3 softwares Cerbot, Ansible, Terraform and found that,
when i add domain name in SAN (subject_alternative_name) its not getting generate the certificates but when i give Common Name alone, It gets generated the certificate.
https://unboundtest.com/ uses same config as lersencrypt, so try filling some txt record into _acme-challenge and try test that. currently there is no test record there
I'm starting to think there may be a problem with the DNS Service Provider (DSP)
OR with the DNS API plugin used by acme.sh
OR something in the way lego (or "terraform") is implementing things
If there's a way to independently test parts of the process, we might get closer to where the problem is.
I have already provided information in the above mail chain. As instructed, I did create certificate using cerbot manually. Its generated it but not when i provide SAN.
Means: It will not work when i follow LE official KB also.