My initial reaction would be: this looks like a workaround for something
that does not exist, probably for a reason. And then you add mitogen to the
mix, which is notorious for pushing the limits with many things.

What is the use case for this playbook_name variable?



Sent from Gmail Mobile


On Tue, 17 Oct 2023 at 15:58, Kathy L <lyonsf...@gmail.com> wrote:

> 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
> <https://groups.google.com/d/msgid/ansible-project/41feabb8-15f9-461b-be84-08a899a5b010n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAF8BbLaOnMnU70b-x-TFH6XTtA33qLZfVkCHbhQ%2BGWET3NwsSg%40mail.gmail.com.

Reply via email to