Merge pull request #12436 from amenonsen/ranges

Support «hosts: foo[1:]» and add tests for split/apply_subscript
This commit is contained in:
James Cammarata 2015-09-18 15:32:15 -04:00
commit 37f2cbc429
3 changed files with 41 additions and 5 deletions

View file

@ -79,8 +79,9 @@ You can refer to hosts within the group by adding a subscript to the group name:
webservers[0] # == cobweb
webservers[-1] # == weber
webservers[0:1] # == webservers[0]:webservers[1]
# == cobweb:webbing
webservers[0:1] # == webservers[0],webservers[1]
# == cobweb,webbing
webservers[1:] # == webbing,weber
Most people don't specify patterns as regular expressions, but you can. Just start the pattern with a '~'::