Ansible: Store command’s stdout in new variable? December 22, 2022 by Tarik You have to store the content as a fact: - set_fact: string_to_echo: "{{ command_output.stdout }}"