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
af8f11e3
Commit
af8f11e3
authored
Sep 26, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1096 from sfromm/issue1067
Ignore failure of stop command if start succeeds with state=restarted
parents
69517832
19c0202a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
library/service
+9
-3
No files found.
library/service
View file @
af8f11e3
...
...
@@ -225,6 +225,7 @@ def main():
# ===========================================
# run change commands if we need to
if
changed
:
if
state
in
[
'started'
,
'running'
]:
rc_state
,
stdout
,
stderr
=
_run
(
"
%
s
%
s start"
%
(
SERVICE
,
name
))
elif
state
==
'stopped'
:
...
...
@@ -234,9 +235,14 @@ def main():
elif
state
==
'restarted'
:
rc1
,
stdout1
,
stderr1
=
_run
(
"
%
s
%
s stop"
%
(
SERVICE
,
name
))
rc2
,
stdout2
,
stderr2
=
_run
(
"
%
s
%
s start"
%
(
SERVICE
,
name
))
rc_state
=
rc
+
rc1
+
rc2
stdout
=
stdout1
+
stdout2
stderr
=
stderr1
+
stderr2
if
rc1
!=
0
and
rc2
==
0
:
rc_state
=
rc
+
rc2
stdout
=
stdout2
stderr
=
stderr2
else
:
rc_state
=
rc
+
rc1
+
rc2
stdout
=
stdout1
+
stdout2
stderr
=
stderr1
+
stderr2
out
+=
stdout
err
+=
stderr
...
...
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