From 0fd3af8c3c0a8c7aae57f587f5246063ff5a744f Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Sat, 27 Apr 2013 12:04:22 -0400 Subject: [PATCH] Document regex patterns. --- docsite/latest/rst/patterns.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docsite/latest/rst/patterns.rst b/docsite/latest/rst/patterns.rst index dce77a6278..3c3df34355 100644 --- a/docsite/latest/rst/patterns.rst +++ b/docsite/latest/rst/patterns.rst @@ -121,7 +121,7 @@ You can do combinations:: You can also use variables:: - webservers:!$excluded:&$required + webservers:!{{excluded}}:&{{required}} Individual host names, IPs and groups, can also be referenced using wildcards:: @@ -133,6 +133,9 @@ It's also ok to mix wildcard patterns and groups at the same time:: one*.com:dbservers +And if the pattern starts with a '~' it is treated as a regular expression:: + + ~(web|db).*\.example\.com Easy enough. See :doc:`examples` and then :doc:`playbooks` for how to do things to selected hosts.