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
1d28212f
Commit
1d28212f
authored
May 08, 2012
by
Jeroen Hoekx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inventory: undefined group -> ungrouped.
Also change test name collision.
parent
3b401589
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
lib/ansible/inventory_parser.py
+4
-4
test/TestInventory.py
+2
-2
No files found.
lib/ansible/inventory_parser.py
View file @
1d28212f
...
...
@@ -54,12 +54,12 @@ class InventoryParser(object):
def
_parse_base_groups
(
self
):
un
defined
=
Group
(
name
=
'undefin
ed'
)
un
grouped
=
Group
(
name
=
'ungroup
ed'
)
all
=
Group
(
name
=
'all'
)
all
.
add_child_group
(
un
defin
ed
)
all
.
add_child_group
(
un
group
ed
)
self
.
groups
=
dict
(
all
=
all
,
un
defined
=
undefin
ed
)
active_group_name
=
'un
defin
ed'
self
.
groups
=
dict
(
all
=
all
,
un
grouped
=
ungroup
ed
)
active_group_name
=
'un
group
ed'
for
line
in
self
.
lines
:
if
line
.
startswith
(
"["
):
...
...
test/TestInventory.py
View file @
1d28212f
...
...
@@ -221,11 +221,11 @@ class TestInventory(unittest.TestCase):
expected_hosts
=
[
'thor'
,
'odin'
,
'loki'
]
self
.
compare
(
hosts
,
expected_hosts
)
def
test_
simple
_ungrouped
(
self
):
def
test_
yaml
_ungrouped
(
self
):
inventory
=
self
.
yaml_inventory
()
hosts
=
inventory
.
list_hosts
(
"ungrouped"
)
expected_hosts
=
[
'jupiter'
,
'zeus'
]
expected_hosts
=
[
'jupiter'
]
self
.
compare
(
hosts
,
expected_hosts
)
def
test_yaml_combined
(
self
):
...
...
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