Ansible - Resolve "global flags not at the start of the expression"
by
Jeremy Canfield |
Updated: March 07 2024
| Ansible articles
Let's say something like this is being returned.
global flags not at the start of the expression
I got this because my regular expression had ^ before (?i)
- meta: end_host
when: inventory_hostname is regex '^(?i)(x|t|p).*'
I resolved this by starting my regular expression with (?i)
- meta: end_host
when: inventory_hostname is regex '(?i)^(x|t|p).*'
Did you find this article helpful?
If so, consider buying me a coffee over at