Format for conditional password change

Am creating a playbook where the password age is set to 0 on userid create. The variable “user_created” gets detected as “changed” when a deleted userid is already deleted (ie, has “absent” in the item.state), so I am trying to work around this by putting a double conditional in the “users set passwd age on add” task. However ansible will not let me reference the item.state variable in any way, shape or form. I have tried “with quotes”, “with brackets”, “without quotes and with brackets”, “with quoutes and without brackets”.

Question 1: Is the “changed” attribute being set when no user was actually removed a bug in the module?

Question 2: What is the syntax for referencing item.state in a conditional?

tasks file for user

Anybody? Bueller? Bueller?

Never use curly brackets in when:, they are implied.