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
9174c52b
Commit
9174c52b
authored
Feb 07, 2013
by
ftao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
always restart the program when state=restarted
parent
dab31116
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
library/supervisorctl
+2
-5
No files found.
library/supervisorctl
View file @
9174c52b
...
...
@@ -87,11 +87,11 @@ def main():
module
.
fail_json
(
msg
=
out
)
elif
running
and
state
==
'restarted'
:
elif
state
==
'restarted'
:
rc
,
out
,
err
=
module
.
run_command
(
'
%
s update
%
s'
%
(
SUPERVISORCTL
,
name
))
rc
,
out
,
err
=
module
.
run_command
(
'
%
s restart
%
s'
%
(
SUPERVISORCTL
,
name
))
if
'
%
s: st
opped'
%
name
in
out
and
'
%
s: st
arted'
%
name
in
out
:
if
'
%
s: started'
%
name
in
out
:
module
.
exit_json
(
changed
=
True
,
name
=
name
,
state
=
state
)
module
.
fail_json
(
msg
=
out
)
...
...
@@ -104,9 +104,6 @@ def main():
module
.
fail_json
(
msg
=
out
)
elif
not
running
and
state
==
'restarted'
:
module
.
fail_json
(
msg
=
'Could not restart `
%
s` because it is not running'
%
name
)
module
.
exit_json
(
changed
=
False
,
name
=
name
,
state
=
state
)
# this is magic, see lib/ansible/module_common.py
...
...
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