Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
eff33bac
Commit
eff33bac
authored
Aug 13, 2015
by
Abhijit Menon-Sen
Committed by
James Cammarata
Aug 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't accept undocumented "p1;p2" patterns; note in changelog
The correct (and now only) way to say p1 OR p2 is "p1:p2".
parent
8aaa06dd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
CHANGELOG.md
+5
-0
lib/ansible/inventory/__init__.py
+5
-5
No files found.
CHANGELOG.md
View file @
eff33bac
...
...
@@ -166,6 +166,11 @@ Other Notable Changes:
*
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)
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
*
Security fixes to check that hostnames match certificates with https urls (CVE-2015-3908)
...
...
lib/ansible/inventory/__init__.py
View file @
eff33bac
...
...
@@ -178,10 +178,11 @@ class Inventory(object):
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
):
pattern
=
'
;
'
.
join
(
pattern
)
patterns
=
self
.
_split_pattern
(
pattern
.
replace
(
";"
,
":"
)
)
pattern
=
'
:
'
.
join
(
pattern
)
patterns
=
self
.
_split_pattern
(
pattern
)
hosts
=
self
.
_get_hosts
(
patterns
)
# exclude hosts not in a subset, if defined
...
...
@@ -520,8 +521,7 @@ class Inventory(object):
if
subset_pattern
is
None
:
self
.
_subset
=
None
else
:
subset_pattern
=
subset_pattern
.
replace
(
','
,
':'
)
subset_patterns
=
self
.
_split_pattern
(
subset_pattern
.
replace
(
";"
,
":"
))
subset_patterns
=
self
.
_split_pattern
(
subset_pattern
)
results
=
[]
# allow Unix style @filename data
for
x
in
subset_patterns
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment