Zack Saadioui
8/27/2024
1
2
bash
pip install ansible1 2 3 4 5 6 7 8 9 10 11 12 13 14--- - name: Setup Ollama hosts: localhost tasks: - name: Ensure Ollama is installed command: curl -fsSL https://ollama.com/install.sh | sh args: creates: /usr/local/bin/ollama - name: Pull the Llama 3.1 model command: ollama pull llama3.1 - name: Serve the Ollama model command: ollama serve
1ansible-playbook setup_ollama.yml
1
Dockerfile1
2
3
4
5
6
7
Dockerfile
FROM ubuntu:20.04
RUN apt-get update && \
    apt-get install -y ansible curl
WORKDIR /app
COPY . .
CMD ["ansible-playbook", "setup_ollama.yml"]1
2
bash
docker build -t ollama-ansible .1
2
bash
docker run --rm ollama-ansibleCopyright © Arsturn 2025