In the beginning of the playbook, I calculate the playbook_name this way:

playbook_name: "{{ lookup('file', '/proc/self/cmdline') | 
regex_replace('\u0000', ' ').split() | select match('match', 
'^[a-zA-Z-_/0-9]*[.]y[a]*ml') | list|first|basename }}"

This works in a typical, ssh playbook run.  We are now testing mitogen, and 
using the playbook_name variable fails with the error:
"Make sure your variable name does not contain invalid characters like '-': 
expected str, bytes or os.PathLike object, not AnsibleUndefined"

The ansible-playbook name is configServer.yml so it doesn't contain any 
strange characters.

Has anyone else had this problem with mitogen?  is there another way to get 
the playbook name being run?

-- 
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/41feabb8-15f9-461b-be84-08a899a5b010n%40googlegroups.com.

Reply via email to