mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix HAS_BOTO fail_json call for ec2_ami_copy
This commit is contained in:
parent
23222160e4
commit
577f56ac79
1 changed files with 3 additions and 3 deletions
|
@ -92,9 +92,6 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
HAS_BOTO = False
|
HAS_BOTO = False
|
||||||
|
|
||||||
if not HAS_BOTO:
|
|
||||||
module.fail_json(msg='boto required for this module')
|
|
||||||
|
|
||||||
def copy_image(module, ec2):
|
def copy_image(module, ec2):
|
||||||
"""
|
"""
|
||||||
Copies an AMI
|
Copies an AMI
|
||||||
|
@ -183,6 +180,9 @@ def main():
|
||||||
|
|
||||||
module = AnsibleModule(argument_spec=argument_spec)
|
module = AnsibleModule(argument_spec=argument_spec)
|
||||||
|
|
||||||
|
if not HAS_BOTO:
|
||||||
|
module.fail_json(msg='boto required for this module')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
ec2 = ec2_connect(module)
|
ec2 = ec2_connect(module)
|
||||||
except boto.exception.NoAuthHandlerFound, e:
|
except boto.exception.NoAuthHandlerFound, e:
|
||||||
|
|
Loading…
Reference in a new issue