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
c2e2d53a
Commit
c2e2d53a
authored
Oct 01, 2013
by
ryanaudiencepi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix monit module. Use lowercase letters check instead of uppercase
parent
ac0a7d96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
library/monitoring/monit
+5
-5
No files found.
library/monitoring/monit
View file @
c2e2d53a
...
...
@@ -100,7 +100,7 @@ def main():
module
.
exit_json
(
changed
=
True
)
module
.
run_command
(
'
%
s stop
%
s'
%
(
MONIT
,
name
))
rc
,
out
,
err
=
module
.
run_command
(
'
%
s summary | grep
%
s'
%
(
MONIT
,
name
))
if
'
N
ot monitored'
in
out
or
'stop pending'
in
out
:
if
'
n
ot monitored'
in
out
or
'stop pending'
in
out
:
module
.
exit_json
(
changed
=
True
,
name
=
name
,
state
=
state
)
module
.
fail_json
(
msg
=
out
)
...
...
@@ -109,7 +109,7 @@ def main():
module
.
exit_json
(
changed
=
True
)
module
.
run_command
(
'
%
s unmonitor
%
s'
%
(
MONIT
,
name
))
rc
,
out
,
err
=
module
.
run_command
(
'
%
s summary | grep
%
s'
%
(
MONIT
,
name
))
if
'
N
ot monitored'
in
out
:
if
'
n
ot monitored'
in
out
:
module
.
exit_json
(
changed
=
True
,
name
=
name
,
state
=
state
)
module
.
fail_json
(
msg
=
out
)
...
...
@@ -118,7 +118,7 @@ def main():
module
.
exit_json
(
changed
=
True
)
module
.
run_command
(
'
%
s stop
%
s'
%
(
MONIT
,
name
))
rc
,
out
,
err
=
module
.
run_command
(
'
%
s start
%
s'
%
(
MONIT
,
name
))
if
'
I
nitializing'
in
out
or
'start pending'
in
out
:
if
'
i
nitializing'
in
out
or
'start pending'
in
out
:
module
.
exit_json
(
changed
=
True
,
name
=
name
,
state
=
state
)
module
.
fail_json
(
msg
=
out
)
...
...
@@ -127,7 +127,7 @@ def main():
module
.
exit_json
(
changed
=
True
)
module
.
run_command
(
'
%
s start
%
s'
%
(
MONIT
,
name
))
rc
,
out
,
err
=
module
.
run_command
(
'
%
s summary | grep
%
s'
%
(
MONIT
,
name
))
if
'
I
nitializing'
in
out
or
'start pending'
in
out
:
if
'
i
nitializing'
in
out
or
'start pending'
in
out
:
module
.
exit_json
(
changed
=
True
,
name
=
name
,
state
=
state
)
module
.
fail_json
(
msg
=
out
)
...
...
@@ -136,7 +136,7 @@ def main():
module
.
exit_json
(
changed
=
True
)
module
.
run_command
(
'
%
s monitor
%
s'
%
(
MONIT
,
name
))
rc
,
out
,
err
=
module
.
run_command
(
'
%
s summary | grep
%
s'
%
(
MONIT
,
name
))
if
'
I
nitializing'
in
out
or
'start pending'
in
out
:
if
'
i
nitializing'
in
out
or
'start pending'
in
out
:
module
.
exit_json
(
changed
=
True
,
name
=
name
,
state
=
state
)
module
.
fail_json
(
msg
=
out
)
...
...
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