From 95b73daa36b23565a8566f71f9b202d3459b685f Mon Sep 17 00:00:00 2001 From: Sam Chudnick Date: Sun, 25 Jun 2023 09:52:36 -0400 Subject: Initial Commit --- .../containers/invidious/handlers/main.yml | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 roles/services/containers/invidious/handlers/main.yml (limited to 'roles/services/containers/invidious/handlers') diff --git a/roles/services/containers/invidious/handlers/main.yml b/roles/services/containers/invidious/handlers/main.yml new file mode 100644 index 0000000..a3a5d0b --- /dev/null +++ b/roles/services/containers/invidious/handlers/main.yml @@ -0,0 +1,29 @@ +- name: login to docker registry + become: yes + become_user: "{{ docker_username }}" + environment: + XDG_RUNTIME_DIR: "/run/user/{{ docker_uid }}" + docker_login: + docker_host: "unix://run/user/{{ docker_uid }}/docker.sock" + registry_url: "{{ docker_registry_url }}" + username: "{{ docker_registry_username }}" + password: "{{ docker_registry_password }}" + +- name: build invidious image + become: yes + become_user: "{{ docker_username }}" + environment: + XDG_RUNTIME_DIR: "/run/user/{{ docker_uid }}" + docker_image: + name: "{{ docker_registry_url }}/{{ docker_registry_username }}/invidious:latest" + docker_host: "unix://run/user/{{ docker_uid }}/docker.sock" + build: + path: /srv/docker/invidious/src + dockerfile: docker/Dockerfile + source: build + push: yes + +- name: restart nginx + service: + name: nginx + state: restarted -- cgit v1.2.3