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
f5c81f79
Commit
f5c81f79
authored
Jul 12, 2013
by
Evan Wies
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
supervisor_ctl: rename to server_url and improve documentation
parent
cbeb6a63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
library/web_infrastructure/supervisorctl
+12
-9
No files found.
library/web_infrastructure/supervisorctl
View file @
f5c81f79
...
@@ -37,7 +37,7 @@ options:
...
@@ -37,7 +37,7 @@ options:
- configuration file path, passed as -c to supervisorctl
- configuration file path, passed as -c to supervisorctl
required: false
required: false
default: null
default: null
serverurl:
server
_
url:
description:
description:
- URL on which supervisord server is listening, passed as -s to supervisorctl
- URL on which supervisord server is listening, passed as -s to supervisorctl
required: false
required: false
...
@@ -66,8 +66,11 @@ EXAMPLES = '''
...
@@ -66,8 +66,11 @@ EXAMPLES = '''
# Manage the state of program to be in 'started' state.
# Manage the state of program to be in 'started' state.
- supervisorctl: name=my_app state=started
- supervisorctl: name=my_app state=started
# Restart another_app using an alternate config file
# Restart my_app, reading supervisorctl configuration from a specified file.
- supervisorctl: name=another_app state=restart config=/var/opt/my_project/supervisord.conf
- supervisorctl: name=my_app state=restart config=/var/opt/my_project/supervisord.conf
# Restart my_app, connecting to supervisord with credentials and server URL.
- supervisorctl: name=my_app state=restart username=test password=testpass server_url=http://localhost:9001
'''
'''
...
@@ -75,7 +78,7 @@ def main():
...
@@ -75,7 +78,7 @@ def main():
arg_spec
=
dict
(
arg_spec
=
dict
(
name
=
dict
(
required
=
True
),
name
=
dict
(
required
=
True
),
config
=
dict
(
required
=
False
),
config
=
dict
(
required
=
False
),
serverurl
=
dict
(
required
=
False
),
server
_
url
=
dict
(
required
=
False
),
username
=
dict
(
required
=
False
),
username
=
dict
(
required
=
False
),
password
=
dict
(
required
=
False
),
password
=
dict
(
required
=
False
),
state
=
dict
(
required
=
True
,
choices
=
[
'present'
,
'started'
,
'restarted'
,
'stopped'
])
state
=
dict
(
required
=
True
,
choices
=
[
'present'
,
'started'
,
'restarted'
,
'stopped'
])
...
@@ -86,15 +89,15 @@ def main():
...
@@ -86,15 +89,15 @@ def main():
name
=
module
.
params
[
'name'
]
name
=
module
.
params
[
'name'
]
state
=
module
.
params
[
'state'
]
state
=
module
.
params
[
'state'
]
config
=
module
.
params
.
get
(
'config'
)
config
=
module
.
params
.
get
(
'config'
)
server
url
=
module
.
params
.
get
(
'server
url'
)
server
_url
=
module
.
params
.
get
(
'server_
url'
)
username
=
module
.
params
.
get
(
'username'
)
username
=
module
.
params
.
get
(
'username'
)
password
=
module
.
params
.
get
(
'password'
)
password
=
module
.
params
.
get
(
'password'
)
supervisorctl_args
=
[
module
.
get_bin_path
(
'supervisorctl'
,
True
)
]
supervisorctl_args
=
[
module
.
get_bin_path
(
'supervisorctl'
,
True
)
]
if
config
:
supervisorctl_args
.
extend
([
'-c'
,
config
])
if
config
:
supervisorctl_args
.
extend
([
'-c'
,
config
])
if
server
url
:
supervisorctl_args
.
extend
([
'-s'
,
server
url
])
if
server
_url
:
supervisorctl_args
.
extend
([
'-s'
,
server_
url
])
if
username
:
supervisorctl_args
.
extend
([
'-u'
,
username
])
if
username
:
supervisorctl_args
.
extend
([
'-u'
,
username
])
if
password
:
supervisorctl_args
.
extend
([
'-p'
,
password
])
if
password
:
supervisorctl_args
.
extend
([
'-p'
,
password
])
def
run_supervisorctl
(
cmd
,
name
=
None
,
**
kwargs
):
def
run_supervisorctl
(
cmd
,
name
=
None
,
**
kwargs
):
args
=
list
(
supervisorctl_args
)
# copy the master args
args
=
list
(
supervisorctl_args
)
# copy the master args
...
...
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