I am trying to automate the creation of a TXT record on Route53. I am having issues with the playbook and decided to strip it right back to a basic invocation:
ansible -vvv -m “route53” -a 'ttl=3600 aws_secret_key=‘secret’ zone=xxx.net record=_acme-challenge.aaa.yyy.xxx.net retry_interval=500 private_zone=False state=present type=TXT wait_timeout=300 wait=True aws_access_key=‘key’ value=VK1_axFJiaazkF0eaz6erW9VebwrNqko8PvaHHte1EM ’ localhost
Route53 is expecting the value enclosed in " " - no matter how I encapsulate the value I get the same error:
localhost | FAILED! => {
“changed”: false,
“invocation”: {
“module_args”: {
“alias”: null,
“alias_evaluate_target_health”: false,
“alias_hosted_zone_id”: null,
“aws_access_key”: “key”,
“aws_secret_key”: “secret”,
“ec2_url”: null,
“failover”: null,
“health_check”: null,
“hosted_zone_id”: null,
“identifier”: null,
“overwrite”: null,
“private_zone”: false,
“profile”: null,
“record”: “_acme-challenge.aaa.bbb.ccc.net”,
“region”: null,
“retry_interval”: 500,
“security_token”: null,
“state”: “present”,
“ttl”: 3600,
“type”: “TXT”,
“validate_certs”: true,
“value”: [
“VK1_axFJiaazkF0eaz6erW9VebwrNqko8PvaHHte1EM”
],
“vpc_id”: null,
“wait”: true,
“wait_timeout”: 300,
“weight”: null,
“zone”: “ccc.net”
}
},
“msg”: “[Invalid Resource Record: FATAL problem: InvalidCharacterString (Value should be enclosed in quotation marks) encountered with ‘VK1_axFJiaazkF0eaz6erW9VebwrNqko8PvaHHte1EM’]”
}
What am I doing wrong ?
Thanks
Andy