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
01e922aa
Commit
01e922aa
authored
Oct 04, 2012
by
Aleksej Romanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Indicate errors with exit code.
parent
53d24ef0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
bin/ansible
+5
-0
bin/ansible-playbook
+4
-0
No files found.
bin/ansible
View file @
01e922aa
...
...
@@ -127,6 +127,11 @@ if __name__ == '__main__':
(
options
,
args
)
=
cli
.
parse
()
try
:
(
runner
,
results
)
=
cli
.
run
(
options
,
args
)
for
result
in
results
[
'contacted'
]
.
values
():
if
'failed'
in
result
or
result
.
get
(
'rc'
,
0
)
!=
0
:
sys
.
exit
(
1
)
if
results
[
'dark'
]:
sys
.
exit
(
1
)
except
errors
.
AnsibleError
,
e
:
# Generic handler for ansible specific errors
print
"ERROR:
%
s"
%
str
(
e
)
...
...
bin/ansible-playbook
View file @
01e922aa
...
...
@@ -140,6 +140,10 @@ def main(args):
colorize
(
'failed'
,
t
[
'failures'
],
'red'
))
print
"
\n
"
for
h
in
hosts
:
stats
=
pb
.
stats
.
summarize
(
h
)
if
stats
[
'failures'
]
!=
0
or
stats
[
'unreachable'
]
!=
0
:
sys
.
exit
(
1
)
except
errors
.
AnsibleError
,
e
:
print
>>
sys
.
stderr
,
"ERROR:
%
s"
%
e
...
...
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