From cafb717b55362b06a1aa276c962779e579fc2715 Mon Sep 17 00:00:00 2001 From: Tim Gerla Date: Tue, 22 Jan 2013 14:29:28 -0800 Subject: [PATCH] Fail gracefully if boto is not available and add me to the author line. --- library/ec2 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/library/ec2 b/library/ec2 index 2e5c399651..034da936af 100644 --- a/library/ec2 +++ b/library/ec2 @@ -93,12 +93,18 @@ examples: - code: "local_action: ec2 keypair=admin instance_type=m1.large image=emi-40603AD1 wait=true group=webserver" description: "Examples from Ansible Playbooks" requirements: [ "boto" ] -author: Seth Vidal +author: Seth Vidal, Tim Gerla ''' -import boto +import sys import time +try: + import boto +except ImportError: + print "failed=True msg='boto required for this module'" + sys.exit(1) + def main(): module = AnsibleModule( argument_spec = dict(