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
On Friday, September 22, 2017 at 7:14:11 PM UTC-4, Brian Coca wrote:
>
> conditionals apply to tasks, not vars_prompt, which is not a task.
>
> --
> ----------
> Brian Coca
>
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/5e731109-9165-414d-8e33-73a7cd858243%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.