refactor: adjusted ollama installation to use proper standards
This commit is contained in:
@@ -4,14 +4,23 @@
|
|||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
|
||||||
- name: Install Ollama
|
- name: Download Ollama install script
|
||||||
ansible.builtin.shell: curl -fsSL https://ollama.com/install.sh | sh
|
ansible.builtin.get_url:
|
||||||
|
url: https://ollama.com/install.sh
|
||||||
|
dest: /tmp/install_ollama.sh
|
||||||
|
mode: '0755'
|
||||||
when: ollama_check.rc != 0
|
when: ollama_check.rc != 0
|
||||||
|
|
||||||
|
- name: Install Ollama
|
||||||
|
ansible.builtin.command: bash -c 'set -o pipefail && sh /tmp/install_ollama.sh'
|
||||||
|
when: ollama_check.rc != 0
|
||||||
|
args:
|
||||||
|
creates: /usr/local/bin/ollama
|
||||||
|
|
||||||
- name: Check if Ollama is running
|
- name: Check if Ollama is running
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
name: ollama
|
name: ollama
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: true
|
||||||
become: true
|
become: true
|
||||||
register: ollama_service
|
register: ollama_service
|
||||||
|
Reference in New Issue
Block a user