I'm using the freeipa APIs in a playbook to get a user's LDAP information.  
I can get the krbpasswordexpiration fine:

"krbpasswordexpiration": [
 {
   "__datetime__": "20220207191401Z"
 }

But I can't figure out how to access the date string to convert it to a 
date object.  I need it in the form of YYMMDD.  If I try to set a fact as 
follows:

user_show.json.result.result.krbpasswordexpiration

I get an error about the fact being a list and not a string.  How do I pull 
out the date string so I can turn it into a date?

What I'm ultimately trying to do is grab a user's expiration date, and 
compare it to the current date.  If the date is greater than or equal to 
180, I need to disable the account.

Thanks!
Harry

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2daf14fd-3227-4329-8ab0-49e8dd1bc9ebn%40googlegroups.com.

Reply via email to