O'Reilly logo
  • sw hii thinks this is interesting:

Regular expressions in the inventory file

From

Cover of Learning Ansible 2 - Second Edition

Note

This section is exhibiting "patterns," not regular expressions. You can, however, use a "~" prefix to indicate that the pattern is a regular expression. Example:

~(web|db).*.example.com