Bootstrap FreeKB - Ansible - Resolve "global flags not at the start of the expression"
Ansible - Resolve "global flags not at the start of the expression"

Updated:   |  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 Buy Me A Coffee



Comments


Add a Comment


Please enter 6be908 in the box below so that we can be sure you are a human.