diff options
author | Sam Chudnick <sam@chudnick.com> | 2023-06-25 09:52:36 -0400 |
---|---|---|
committer | Sam Chudnick <sam@chudnick.com> | 2023-06-25 09:52:36 -0400 |
commit | 95b73daa36b23565a8566f71f9b202d3459b685f (patch) | |
tree | cb17b021be70e7868d0ec235a761f0ecdc80f3f2 /roles/services/containers/invidious/handlers |
Diffstat (limited to 'roles/services/containers/invidious/handlers')
-rw-r--r-- | roles/services/containers/invidious/handlers/main.yml | 29 |
1 files changed, 29 insertions, 0 deletions
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 @@ | |||
1 | - name: login to docker registry | ||
2 | become: yes | ||
3 | become_user: "{{ docker_username }}" | ||
4 | environment: | ||
5 | XDG_RUNTIME_DIR: "/run/user/{{ docker_uid }}" | ||
6 | docker_login: | ||
7 | docker_host: "unix://run/user/{{ docker_uid }}/docker.sock" | ||
8 | registry_url: "{{ docker_registry_url }}" | ||
9 | username: "{{ docker_registry_username }}" | ||
10 | password: "{{ docker_registry_password }}" | ||
11 | |||
12 | - name: build invidious image | ||
13 | become: yes | ||
14 | become_user: "{{ docker_username }}" | ||
15 | environment: | ||
16 | XDG_RUNTIME_DIR: "/run/user/{{ docker_uid }}" | ||
17 | docker_image: | ||
18 | name: "{{ docker_registry_url }}/{{ docker_registry_username }}/invidious:latest" | ||
19 | docker_host: "unix://run/user/{{ docker_uid }}/docker.sock" | ||
20 | build: | ||
21 | path: /srv/docker/invidious/src | ||
22 | dockerfile: docker/Dockerfile | ||
23 | source: build | ||
24 | push: yes | ||
25 | |||
26 | - name: restart nginx | ||
27 | service: | ||
28 | name: nginx | ||
29 | state: restarted | ||