I want to pretty print the generated JSON file. Otherwise I would have used
the template module.
On Tuesday, November 21, 2017 at 1:51:30 AM UTC+11, Brian Coca wrote:
>
> Just a note, this task does x2 transformations it does not need to, if
> you use template directly you avoid many problems.
>
> so instead of:
> - copy:
> content: "{{ lookup('template', 'check_def.json.j2') | to_nice_json
> }}"
> dest: "{{ somewhere }}"
> with_items: "{{ check_sets }}"
> notify: Restart Sensu
>
> use:
> - template: src=check_def.json.j2 dest={{somewhere}}
> with_items: "{{ check_sets }}"
> notify: Restart Sensu
>
>
>
>
> --
> ----------
> Brian Coca
>
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/ff2e622c-8be8-4e3d-a313-033543eed673%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.