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
6957d66a
Commit
6957d66a
authored
Apr 14, 2015
by
Michael Scherer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not import all ansible errors and fix the exception raised
parent
0345b675
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
v2/ansible/inventory/dir.py
+3
-3
No files found.
v2/ansible/inventory/dir.py
View file @
6957d66a
...
@@ -23,7 +23,7 @@ __metaclass__ = type
...
@@ -23,7 +23,7 @@ __metaclass__ = type
import
os
import
os
from
ansible
import
constants
as
C
from
ansible
import
constants
as
C
from
ansible.errors
import
*
from
ansible.errors
import
AnsibleError
from
ansible.inventory.host
import
Host
from
ansible.inventory.host
import
Host
from
ansible.inventory.group
import
Group
from
ansible.inventory.group
import
Group
...
@@ -160,7 +160,7 @@ class InventoryDirectory(object):
...
@@ -160,7 +160,7 @@ class InventoryDirectory(object):
# name
# name
if
group
.
name
!=
newgroup
.
name
:
if
group
.
name
!=
newgroup
.
name
:
raise
errors
.
AnsibleError
(
"Cannot merge group
%
s with
%
s"
%
(
group
.
name
,
newgroup
.
name
))
raise
AnsibleError
(
"Cannot merge group
%
s with
%
s"
%
(
group
.
name
,
newgroup
.
name
))
# depth
# depth
group
.
depth
=
max
([
group
.
depth
,
newgroup
.
depth
])
group
.
depth
=
max
([
group
.
depth
,
newgroup
.
depth
])
...
@@ -210,7 +210,7 @@ class InventoryDirectory(object):
...
@@ -210,7 +210,7 @@ class InventoryDirectory(object):
# name
# name
if
host
.
name
!=
newhost
.
name
:
if
host
.
name
!=
newhost
.
name
:
raise
errors
.
AnsibleError
(
"Cannot merge host
%
s with
%
s"
%
(
host
.
name
,
newhost
.
name
))
raise
AnsibleError
(
"Cannot merge host
%
s with
%
s"
%
(
host
.
name
,
newhost
.
name
))
# group membership relation
# group membership relation
for
newgroup
in
newhost
.
groups
:
for
newgroup
in
newhost
.
groups
:
...
...
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