diff --git a/cloud/amazon/cloudformation.py b/cloud/amazon/cloudformation.py index 236bc89000d..d754ee4bf24 100644 --- a/cloud/amazon/cloudformation.py +++ b/cloud/amazon/cloudformation.py @@ -146,6 +146,7 @@ EXAMPLES = ''' ''' import json +import os import time import yaml @@ -269,7 +270,7 @@ def main(): module.fail_json('Module parameter "template" or "template_url" is required if "state" is "present"') if module.params['template'] is not None: - template_body = open(module.params['template'], 'r').read() + template_body = open(os.path.expanduser(module.params['template']), 'r').read() else: template_body = None