Hi guys,
I’m trying to use Ansible to provision DNS records in OpenStack using the os_recordset module.
I’m running Ansible 2.2.0.0 installed from python pip on Ubuntu 16.04.
I have an A record setup already for this specific FQDN, but when I go to add an AAAA record alongside it, the following error come up:
task path: /home/ubuntu/work/playbooks/setup_designate_zone.yml:23
Using module file /usr/local/lib/python2.7/dist-packages/ansible/modules/extras/cloud/openstack/os_recordset.py
ESTABLISH LOCAL CONNECTION FOR USER: ubuntu
EXEC /bin/sh -c ‘( umask 77 && mkdir -p “echo $HOME/.ansible/tmp/ansible-tmp-1482213565.49-738654580181
” && echo ansible-tmp-1482213565.49-738654580181=“echo $HOME/.ansible/tmp/ansible-tmp-1482213565.49-738654580181
” ) && sleep 0’
PUT /tmp/tmp6CHd6g TO /home/ubuntu/.ansible/tmp/ansible-tmp-1482213565.49-738654580181/os_recordset.py
EXEC /bin/sh -c ‘chmod u+x /home/ubuntu/.ansible/tmp/ansible-tmp-1482213565.49-738654580181/ /home/ubuntu/.ansible/tmp/ansible-tmp-1482213565.49-738654580181/os_recordset.py && sleep 0’
EXEC /bin/sh -c ‘/usr/bin/python /home/ubuntu/.ansible/tmp/ansible-tmp-1482213565.49-738654580181/os_recordset.py; rm -rf “/home/ubuntu/.ansible/tmp/ansible-tmp-1482213565.49-738654580181/” > /dev/null 2>&1 && sleep 0’
fatal: [ → localhost]: FAILED! => {
“changed”: false,
“failed”: true,
“invocation”: {
“module_args”: {
“api_timeout”: null,
“auth”: null,
“auth_type”: null,
“availability_zone”: null,
“cacert”: null,
“cert”: null,
“cloud”: “dev”,
“description”: null,
“endpoint_type”: “public”,
“key”: null,
“name”: “oc”,
“records”: [
“”
],
“recordset_type”: “AAAA”,
“region_name”: null,
“state”: “present”,
“timeout”: 180,
“ttl”: 3600,
“verify”: true,
“wait”: true,
“zone”: “.”
},
“module_name”: “os_recordset”
},
“msg”: “Error updating recordset . (Inner Exception: u’’ is not a ‘ipv4’)”
}
The Task that’s failing is:
- name: Setup AAAA entries
delegate_to: localhost
os_recordset:
cloud: dev
state: present
zone: “.”
name: “oc”
recordset_type: AAAA
records: “{{ openstack.accessIPv6 }}”
ttl: 3600
Any help would be great.
Thanks