我试图使用ansible创建dns条目,但出现以下错误。
/tmp/ansible_route53_payload_oyijp456/ansible_route53_payload.zip/ansible_collections/amazon/aws/plugins/module_utils/cloud.py", line 144, in retry_func
return f(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/botocore/client.py", line 530, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/lib/python3.7/site-packages/botocore/client.py", line 960, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.errorfactory.InvalidInput: An error occurred (InvalidInput) when calling the ChangeResourceRecordSets operation: Invalid request: Missing field 'SetIdentifier' in Change with [Action=UPSERT, Name=test.xdp.comcast.net., Type=A, SetIdentifier=null]
fatal: [xdpeksbuild-e1a-02-devops.xdp.comcast.net]: FAILED! => {
"boto3_version": "1.26.62",
"botocore_version": "1.29.100",
"changed": false,
"error": {
"code": "InvalidInput",
"message": "Invalid request: Missing field 'SetIdentifier' in Change with [Action=UPSERT, Name=test.xdp.comcast.net., Type=A, SetIdentifier=null]
示例:
- name: "Create/update dns record for green env"
route53:
state: present
zone: ""
record: ""
type: A
value: ""
identifier: "east"
region: "east"
overwrite: yes
alias: True
alias_hosted_zone_id: ""
我看到了Python 3的问题,但同样适用于Python 2.7。
1条答案
按热度按时间sdnqo3pr1#
您提供的Ansible playbook正在尝试使用Route53模块创建DNS记录。但是,错误消息指示更改请求中缺少必需的字段“SetIdentifier”。
您需要为“SetIdentifier”字段提供一个值。