Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Please apply patch at http://merlin.wl0.org/201305/01/ansible-1.0-extend-patterns.patch to extend pattern matching #3135
I use ansible to talk to servers at work and the current hostname matching does not cover cases I use where there is more than one "variable" part. Thus to reduce the size of the ansible host file applying this patch allows me to include my hosts (and make the pattern matching more flexible) but in a much more compact ansible file.
I see that this is not in ansible 1.1 (from macports) so hope that perhaps it can be added to the (I believe) upcoming 1.2 version. Patches cleanly against 1.0 and 1.1.
Example patterns I use are:
This generates (with a patched 1.2):
[sjmudd@m7 ~]$ ansible all-app --list-hosts
Happy to review this, just send me a PR.
It's very hard to do code review on a blog post or if everyone did it a different way.
See tips here: https://help.github.com/articles/using-pull-requests