You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
motief/ansible/deploy.yaml

34 lines
956 B

---
- name: deploy motief application
hosts: sgeboers.nl
remote_user: webapps
tasks:
- name: ensure git.sgeboers.nl is in known_hosts
ansible.builtin.known_hosts:
name: git.sgeboers.nl
key: "{{ lookup('pipe', 'ssh-keyscan git.sgeboers.nl') }}"
state: present
- name: pull latest code
ansible.builtin.git:
repo: git@git.sgeboers.nl:sgeboers/motief.git
dest: ~/motief
clone: yes
force: yes
key_file: ~/.ssh/id_ed25519
accept_newhostkey: yes
- name: sync dependencies with uv
ansible.builtin.shell:
cmd: uv sync
chdir: ~/motief
- name: stop existing streamlit process
ansible.builtin.shell:
cmd: pkill -f "streamlit run Home.py" || true
- name: start streamlit
ansible.builtin.shell:
cmd: nohup uv run streamlit run Home.py --server.port=8501 --server.address=0.0.0.0 &
chdir: ~/motief