Don't accept undocumented "p1;p2" patterns; note in changelog
The correct (and now only) way to say p1 OR p2 is "p1:p2".
This commit is contained in:
parent
8aaa06dd50
commit
eff33bac49
2 changed files with 10 additions and 5 deletions
|
@ -166,6 +166,11 @@ Other Notable Changes:
|
||||||
* play output is now dynamically sized to terminal with a minimal of 80 coluumns (old default)
|
* play output is now dynamically sized to terminal with a minimal of 80 coluumns (old default)
|
||||||
* vars_prompt and pause are now skipped with a warning if the play is called non interactively (i.e. pull from cron)
|
* vars_prompt and pause are now skipped with a warning if the play is called non interactively (i.e. pull from cron)
|
||||||
|
|
||||||
|
Minor changes:
|
||||||
|
|
||||||
|
* The undocumented semicolon-separated "pattern1;pattern2" syntax to
|
||||||
|
match hosts is no longer supported.
|
||||||
|
|
||||||
## 1.9.2 "Dancing In the Street" - Jun 26, 2015
|
## 1.9.2 "Dancing In the Street" - Jun 26, 2015
|
||||||
|
|
||||||
* Security fixes to check that hostnames match certificates with https urls (CVE-2015-3908)
|
* Security fixes to check that hostnames match certificates with https urls (CVE-2015-3908)
|
||||||
|
|
|
@ -178,10 +178,11 @@ class Inventory(object):
|
||||||
applied subsets.
|
applied subsets.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# process patterns
|
# Enumerate all hosts matching the given pattern (which may be
|
||||||
|
# either a list of patterns or a string like 'pat1:pat2').
|
||||||
if isinstance(pattern, list):
|
if isinstance(pattern, list):
|
||||||
pattern = ';'.join(pattern)
|
pattern = ':'.join(pattern)
|
||||||
patterns = self._split_pattern(pattern.replace(";",":"))
|
patterns = self._split_pattern(pattern)
|
||||||
hosts = self._get_hosts(patterns)
|
hosts = self._get_hosts(patterns)
|
||||||
|
|
||||||
# exclude hosts not in a subset, if defined
|
# exclude hosts not in a subset, if defined
|
||||||
|
@ -520,8 +521,7 @@ class Inventory(object):
|
||||||
if subset_pattern is None:
|
if subset_pattern is None:
|
||||||
self._subset = None
|
self._subset = None
|
||||||
else:
|
else:
|
||||||
subset_pattern = subset_pattern.replace(',',':')
|
subset_patterns = self._split_pattern(subset_pattern)
|
||||||
subset_patterns = self._split_pattern(subset_pattern.replace(";",":"))
|
|
||||||
results = []
|
results = []
|
||||||
# allow Unix style @filename data
|
# allow Unix style @filename data
|
||||||
for x in subset_patterns:
|
for x in subset_patterns:
|
||||||
|
|
Loading…
Reference in a new issue