I'll make a pull request here:
https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html
To add this example'Tis was a lot of looking around.
Thanks!
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from t
MM> The problem is that cannot nest jinja brackets inside of brackets.
Ah! Right, because brackets mean "Jinja", not just "variable". Still new
here. :^)
MM> Your following example:
MM>
MM> {{ ansible_hostname | regex_replace("^{{service}}-{{site}}-", '') }}
MM>
MM> Should probably be:
MM>
MM>
The problem is that cannot nest jinja brackets inside of brackets. Your
following example:
{{ ansible_hostname | regex_replace("^{{service}}-{{site}}-", '') }}
Should probably be:
{{ ansible_hostname | regex_replace("^" + service + "-" + site + "-", '')
}}
Inside of {{ }} variables are alr
I have some variables like 'service', which can be "abc" or "xyz", and
'site', which can be "bos" or "sfo", on different hosts. I have hosts
whose FQDNs are like service-site-thing-N.site.service.care.com, which
have those those variables set accordingly, in a group like 'things'.
My use case is t