ansible-haproxy icon indicating copy to clipboard operation
ansible-haproxy copied to clipboard

Fix log-format in templates

Open mvdriel opened this issue 4 years ago • 10 comments

mvdriel avatar Apr 21 '20 11:04 mvdriel

I have a feeling this is on purpose

tersmitten avatar Apr 21 '20 12:04 tersmitten

I see no quotes at all in the template(s)

tersmitten avatar Apr 21 '20 12:04 tersmitten

The documentation should probably be:

e.g. `'"%{+Q}o\ %t\ %s\ %{-Q}r"'`

tersmitten avatar Apr 21 '20 12:04 tersmitten

Similar to:

    tcp_check:
      - 'send stats\r\n'
      - 'expect rstring "STAT pid [0-9]+"'
      - 'send quit\r\n'

tersmitten avatar Apr 21 '20 12:04 tersmitten

But I understand that this is not super intuitive

tersmitten avatar Apr 21 '20 12:04 tersmitten

@tersmitten We could add more quotes in the templates. ;)

mvdriel avatar Apr 21 '20 13:04 mvdriel

Yes, but this will break existing installations and there's a workaround

tersmitten avatar Apr 21 '20 13:04 tersmitten

@tersmitten Something for 7.* or do you prefer to keep it this way?

mvdriel avatar Apr 21 '20 14:04 mvdriel

Something for 7.* Yes

But if I can find the time I prefer to make the role more like this one: https://github.com/Oefenweb/ansible-nginx#examples

"Raw" configuration is way more flexible and easier to maintain

tersmitten avatar Apr 22 '20 06:04 tersmitten

The documentation should probably be:

e.g. `'"%{+Q}o\ %t\ %s\ %{-Q}r"'`

Yes, in: https://github.com/Oefenweb/ansible-haproxy/pull/106

mvdriel avatar Apr 22 '20 21:04 mvdriel