【发布时间】:2020-01-07 13:54:46
【问题描述】:
我在 ansible 中使用 cloudformation 模块,但在传递参数文件时遇到问题。
致命:[本地主机]:失败! => {“改变”:假,“味精”:“不支持 (cloudformation) 模块的参数:dist 支持的参数 包括:aws_access_key、aws_secret_key、backoff_delay、 backoff_max_delay,backoff_retries,功能,changeset_name, create_changeset、create_timeout、debug_botocore_endpoint_logs、 disable_rollback、ec2_url、events_limit、notification_arns、profile、 区域,role_arn,security_token,stack_name,stack_policy,状态, 标签,模板,模板主体,模板格式,模板参数, template_url、termination_protection、validate_certs"}
我已经使用了没有dist属性的template_parameters,如下图,
#template_parameters: "{{ lookup('file', '/root/cloudformation_template/Parameter-tableau.json') | from_json }}"
但我遇到了同样的错误。该任务类似于以下任务,
- name: create a cloudformation stack
cloudformation:
stack_name: "ansible-cloudformation111"
state: "present"
template: "/root/cloudformation_template/poc-tableau.json"
template_parameters:
dist: "{{ lookup('file', '/root/cloudformation_template/Parameter-tableau.json') }}"
【问题讨论】:
标签: ansible ansible-facts