Hi Brian,
Thanks for the reply. After error testing, I commented out the conditional in vars_prompt and reinserted it right after the task command, however it's not liking the logic in my when-statement. Do you happen to know where I'm running into an error? I'm trying to add an exception to prevent the script from running if a user specifies the wrong account to delete such as 'root'.
I took out the quotes and brackets from the remove_user variable, but after running the playbook kicked back this message:
ERROR! Syntax Error while loading YAML.
The offending line appears to be:
command: "userdel {{ user_to_remove }}"
when: user_to_remove != "root"
^ here