We could be wrong, but this one looks like it might be an issue with missing quotes.

1,230 views
Skip to first unread message

Andrew Holway

unread,
Apr 15, 2014, 12:26:08 PM4/15/14
to ansible...@googlegroups.com

Hello,

I am stuck with the following problem. I have tried various combinations of quotes but always get the same error.

Thanks,

Andrew

[root@ansible ansible-catn-freeipa]# ansible-playbook freeipa.yml -i hosts
ERROR: Syntax Error while loading YAML script, /root/ansible-catn-freeipa/roles/replica/tasks/free-ipa-setup.yml
Note: The error may actually appear before this position: line 36, column 9

name: Pull file from ansible server
  - copy: "src=/tmp/{{ freeipaserver_ip }}/var/lib/ipa/replica-info-{{ ansible_hostname }}.gpg dest=/var/lib/ipa/replica-info-{{ ansible_hostname }}.gpg owner=foo group=foo mode=0644"
        ^
We could be wrong, but this one looks like it might be an issue with
missing quotes.  Always quote template expression brackets when they 
start a value. For instance:            

    with_items:
      - {{ foo }}

Should be written as:

    with_items:
      - "{{ foo }}"   

James Cammarata

unread,
Apr 15, 2014, 2:12:23 PM4/15/14
to ansible...@googlegroups.com
This looks like it's actually an issue with your indentation and YAML syntax. Your line should be as follows:

- name: Pull file from ansible server
  copy: "src=/tmp/{{ freeipaserver_ip }}/var/lib/ipa/replica-info-{{ ansible_hostname }}.gpg dest=/var/lib/ipa/replica-info-{{ ansible_hostname }}.gpg owner=foo group=foo mode=0644"


--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/cc0ca0b5-27b3-4b93-9ec9-c073dcc13a1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages