From 1540775dfeb4a413dff9b0293428d17df0f6b494 Mon Sep 17 00:00:00 2001 From: Matan Horovitz Date: Fri, 24 Nov 2023 14:58:11 +0200 Subject: [PATCH] stuff --- containers.yaml | 6 ++++++ docker.yaml | 2 ++ traefik.yaml | 5 ----- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/containers.yaml b/containers.yaml index a1e67fb..f1833d3 100644 --- a/containers.yaml +++ b/containers.yaml @@ -1,3 +1,8 @@ +- name: Make sure Container directory exists + ansible.builtin.file: + path: "{{ container_dir }}" + state: directory + - ansible.builtin.git: repo: https://git.pukeko.xyz/shmick/docker.git dest: "{{ container_dir }}/{{ item }}" @@ -6,6 +11,7 @@ - ansible.builtin.template: src: "{{ container_dir }}/{{ item }}/docker-compose.yml.j2" dest: "{{ container_dir }}/{{ item }}/docker-compose.yml" + delegate_to: localhost - community.docker.docker_compose: project_src: "{{ container_dir }}/{{ item }}" diff --git a/docker.yaml b/docker.yaml index 8375cff..d67fe7b 100644 --- a/docker.yaml +++ b/docker.yaml @@ -17,6 +17,7 @@ # ^ ex: Ubuntu -> ubuntu url: "https://download.docker.com/linux/ubuntu/gpg" state: present + ignore_errors: yes - name: Add Docker's APT repo @@ -25,6 +26,7 @@ repo: "deb [arch={{ docker_arch }}] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable" state: present update_cache: yes + ignore_errors: yes - name: Install docker and dependencies ansible.builtin.apt: diff --git a/traefik.yaml b/traefik.yaml index 0d01620..c48426b 100644 --- a/traefik.yaml +++ b/traefik.yaml @@ -10,11 +10,6 @@ - name: Install Docker CE ## From: https://gist.github.com/rbq/886587980894e98b23d0eee2a1d84933, https://docs.docker.com/engine/install/ include_tasks: docker.yaml - - name: Make sure Container directory exists - ansible.builtin.file: - path: "{{ container_dir }}" - state: directory - - name: Set up containers include_tasks: containers.yaml with_items: