Hi All

I am trying to run ansible playbook to create powerdns record .pdns.yml

- name: add dns record
    vars:
      pilot_dns: "{{ input_dns }}"
      pilot_dom: "{{ input_domain }}"
      arecord: "{{ input_hostname }}"
      iprecord: "{{ input_ip }}"
    command: curl -X PATCH --data '{"rrsets": [ {"name": "'" {{ arecord }} 
".'", "type": "A", "ttl": 86400, "changetype": "REPLACE", "records": [ 
{"content": "'" {{ iprecord }} "'", "disabled": false } ] } ] }' -H 
"'X-API-Key: changeme'" 'http://"{{ pilot_pdns 
}}":8081/api/v1/servers/localhost/zones/"{{ pilot_dom }}".' | jq .
    tags: add_pdns

I get syntax error when i run as "ansible-playbook pdns.yml --check"

ERROR! Syntax Error while loading YAML.
   The offending line appears to be:

      iprecord: "{{ input_ip }}"
    command: curl -X PATCH --data '{"rrsets": [ {"name": "'" {{ arecord }} 
".'", "type": "A", "ttl": 86400, "changetype": "REPLACE", "records": [ 
{"content": "'" {{ iprecord }} "'", "disabled": false } ] } ] }' -H 
"'X-API-Key: changeme'" 'http://"{{ pilot_pdns 
}}":8081/api/v1/servers/localhost/zones/"{{ pilot_dom }}".' | jq .
                                            ^ here

any help here ?

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7f33367e-f6a5-44c7-8f5b-2374f481522f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to