On 11/27/19 10:47 AM, deva raju wrote:
> Hi Stefan,
>
>
> FYI >>>
>
> vars.yml
>
> apache_log_format: '\[%{%d\/%b\/%Y:%H:%M:%S}t\.%{msec_frac}t %{%z}t\] %a %h
> \\"%r\\" '
>
> - name: Standardize access log format
> shell:
> sed -i '/LogFormat/c LogFormat "rev_proxy@{{ hostname }} {{
> apache_log_format }}" common/'
> /var/httpd/conf/httpd.conf;
>
>
> Error:
>
> TASK [Standardize access log format]
> ******************************************************************************************************************
> fatal: [test.local]: FAILED! => {"msg": "An unhandled exception occurred
> while templating
> '\\[%{%d\\/%b\\/%Y:%H:%M:%S}t\\.%{msec_frac}t %{%z}t\\] %a %h
> \\\\\"%r\\\\\" '. Error was a <class
> 'ansible.errors.AnsibleError'>, original message: template error while
> templating string: Encountered unknown tag 'd'..
> String: \\[%{%d\\/%b\\/%Y:%H:%M:%S}t\\.%{msec_frac}t %{%z}t\\] %a %h
> \\\\\"%r\\\\\" "}
Hello Deva,
please use lineinfile module or templating instead of the shell.
Regards
Racke
>
>
> --
> 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/f5a33d00-98b7-41fc-a5a9-d6e52f925f49%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/f5a33d00-98b7-41fc-a5a9-d6e52f925f49%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/fde3efba-d2f3-88a9-9e54-5aa8307c98f1%40linuxia.de.
signature.asc
Description: OpenPGP digital signature
