--- - name: pull ollama models become: true ansible.builtin.command: ollama pull {{ item }} loop: "{{ ollama_models }}" register: result retries: 3 delay: 10 until: result is not failed changed_when: "'pulling' in result.stderr or 'pulling' in result.stdout"