Ansible - passando a string JSON no ambiente para o módulo shell
Estou tentando passar a string JSON no ambiente.
- name: Start {{service_name}}
shell: "<<starting springboot jar>> --server.port={{service_port}}\""
environment:
- SPRING_APPLICATION_JSON: '{"test-host.1":"{{test_host_1}}","test-host.2":"{{test_host_2}}"}'
test_host_1 é 172.31.00.00
test_host_2 é 172.31.00.00
Mas nos logs de primavera, recebo a exceção de análise JSON em que ela imprime
Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character (''' (code 39)): was expecting double-quote to start field name
at [Source: {'test-host.1': '172.31.00.00', 'test-host.2': '172.31.00.00'}; line: 1, column: 3]
Como visto, aspas duplas são convertidas em aspas simples !!!
Tentei escapar de aspas duplas, mas sem sorte.
Alguma idéia de por que isso acontece ou alguma solução alternativa?