--- - name: Register variable {{ item }} shell: . {{ shell_script }} && echo ${{ item }} register: output_var changed_when: false - name: Set variable {{ item }} set_fact: "{{ item }}": "{{ output_var.stdout }}" changed_when: false