From 4de04d0d3a9faeb682a93283f7015ff59cfea135 Mon Sep 17 00:00:00 2001 From: jakub Date: Fri, 9 Jan 2026 18:23:56 +0000 Subject: [PATCH] Add homarr.yml --- homarr.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 homarr.yml diff --git a/homarr.yml b/homarr.yml new file mode 100644 index 0000000..c2830fe --- /dev/null +++ b/homarr.yml @@ -0,0 +1,39 @@ +- name: Update Homarr + hosts: linux_servers + become: true + gather_facts: false + + vars: + homarr_project: homarr + homarr_compose_file: /data/compose/homarr/docker-compose-homarr.yml + homarr_service: homarr + homarr_port: 7575 + + tasks: + - name: Pull latest Homarr image + community.docker.docker_compose_v2: + project_src: "{{ homarr_compose_file | dirname }}" + files: + - "{{ homarr_compose_file | basename }}" + pull: always + + - name: Recreate Homarr service + community.docker.docker_compose_v2: + project_src: "{{ homarr_compose_file | dirname }}" + files: + - "{{ homarr_compose_file | basename }}" + services: + - "{{ homarr_service }}" + state: present + recreate: always + + - name: Wait for Homarr port + ansible.builtin.wait_for: + host: 127.0.0.1 + port: "{{ homarr_port }}" + timeout: 60 + + - name: Check Homarr HTTP endpoint + ansible.builtin.uri: + url: "http://127.0.0.1:{{ homarr_port }}/" + status_code: 200 \ No newline at end of file