Change type of parameter 'template' to 'path'.

reviewable/pr18780/r1
Jens Carl 9 years ago
parent e25605cd5b
commit dc109387bd

@ -146,7 +146,6 @@ EXAMPLES = '''
''' '''
import json import json
import os
import time import time
import yaml import yaml
@ -242,7 +241,7 @@ def main():
stack_name=dict(required=True), stack_name=dict(required=True),
template_parameters=dict(required=False, type='dict', default={}), template_parameters=dict(required=False, type='dict', default={}),
state=dict(default='present', choices=['present', 'absent']), state=dict(default='present', choices=['present', 'absent']),
template=dict(default=None, required=False), template=dict(default=None, required=False, type='path'),
notification_arns=dict(default=None, required=False), notification_arns=dict(default=None, required=False),
stack_policy=dict(default=None, required=False), stack_policy=dict(default=None, required=False),
disable_rollback=dict(default=False, type='bool'), disable_rollback=dict(default=False, type='bool'),
@ -270,7 +269,7 @@ def main():
module.fail_json('Module parameter "template" or "template_url" is required if "state" is "present"') module.fail_json('Module parameter "template" or "template_url" is required if "state" is "present"')
if module.params['template'] is not None: if module.params['template'] is not None:
template_body = open(os.path.expanduser(module.params['template']), 'r').read() template_body = open(module.params['template'], 'r').read()
else: else:
template_body = None template_body = None

Loading…
Cancel
Save