Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

now missing dep gives nicer error and docs disambiguate lib #3867

Merged
merged 1 commit into from
Aug 16, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 10 additions & 2 deletions library/monitoring/pingdom
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description:
version_added: "1.2"
author: Justin Johns
requirements:
- "pingdom python library"
- "This pingdom python library: https://github.com/mbabineau/pingdom-python"
options:
state:
description:
Expand Down Expand Up @@ -66,7 +66,12 @@ EXAMPLES = '''
state=running
'''

import pingdom
try:
import pingdom
HAS_PINGDOM = True
except:
HAS_PINGDOM = False



def pause(checkid, uid, passwd, key):
Expand Down Expand Up @@ -105,6 +110,9 @@ def main():
)
)

if not HAS_PINGDOM:
module.fail_json(msg="Missing requried pingdom module (check docs)")

checkid = module.params['checkid']
state = module.params['state']
uid = module.params['uid']
Expand Down