If you share the whole exception you should find it's giving you helper
text telling you what to do with it.

Let us know if not.

meanwhile, it seems you are doing a local copy, which is a little curious
compared to doing a remote copy (copy module).

All being said, this is the simplest possible representation:

shell: cp /tmp/{{my_server}}.crt /etc/{{my_server}}.crt
 creates=/etc/{{my_server}}.crt



On Sun, Nov 2, 2014 at 10:59 PM, hce h <jupiter....@gmail.com> wrote:

> Thanks Matt, please see following comments:
>
> On Monday, November 3, 2014 12:44:38 PM UTC+11, Matt Martz wrote:
>>
>> It might help to actually state what the "syntax error" is.
>
>
> ERROR: Syntax Error while loading YAML script copyCert.yml
>
> creates: /etc/{{ my_server }}.crt
>                                           ^
>
>>
>> Also what version of ansible are you using?
>>
>>  ansible-1.7-1.el6.noarch
>
> On Sunday, November 2, 2014, hce h <jupit...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> The following examples gave me a syntax error, appreciate clues to use
>>> template inside creates statement.
>>>
>>> shell: "cp /tmp/{{ my_server }}.crt /etc/{{ my_server }}.crt"
>>> args:
>>>   creates: /etc/{{ my_server }}.crt
>>>
>>> Thank you.
>>>
>>> Kind regards,
>>>
>>> - j
>>>
>>> --
>>> 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-project+unsubscr...@googlegroups.com.
>>> To post to this group, send email to ansible-project@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/ansible-project/587031e4-c442-4f9d-9ab9-
>>> d03ad86227f2%40googlegroups.com
>>> <https://groups.google.com/d/msgid/ansible-project/587031e4-c442-4f9d-9ab9-d03ad86227f2%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>> Matt Martz
>> @sivel
>> sivel.net
>>
>>  --
> 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-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/125b4c27-db91-46df-8936-56cbc846be29%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/125b4c27-db91-46df-8936-56cbc846be29%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgxpg5vgfoSO%2BqQ3%3DDbPAC1tBirPPecs0fefXr63YiWnVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to