Inside my playbook I\'d like to create a variable holding the output of an external command. Afterwards I want to make use of that variable in a couple of templates.
You have to store the content as a fact:
- set_fact: string_to_echo: "{{ command_output.stdout }}"