On 10/27/20 8:21 PM, Roy Lenferink wrote:
> Hello everyone,
> 
> I am having a problem with defining a string variable in Ansible (v2.9.9)
> 
> The string I want to define (for the geerlingguy.apache role):
> apache_global_vhost_settings: |
>   LogFormat "<%%JSON:httpd_access%%> { \"time\": \"%\{%Y}t\" }" combined
>   CustomLog logs/access_log combined
> 
> This doesn't work and I am getting the following error message:
> /template error while templating string: Encountered unknown tag 'Y'.. 
> String: LogFormat//  <snip>/
> 
> It basically comes down to the following part: \"%\{%Y}t\" }
> 
> How can I achieve the specified string in Ansible ? I tried escaping several 
> properties however wasn't able to find out
> a solution.

Well, how should the expected LogFormat line look like?

Regards
        Racke

> 
> Best regards,
> Roy
> //
> 
> -- 
> 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] 
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/2a810b8d-48a3-4157-b3ca-2048cd022de5n%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/2a810b8d-48a3-4157-b3ca-2048cd022de5n%40googlegroups.com?utm_medium=email&utm_source=footer>.


-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/03980858-600e-337a-e18b-d95faeae6442%40linuxia.de.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to