diff --git a/containers.yaml b/containers.yaml index a1e67fb..7832fff 100644 --- a/containers.yaml +++ b/containers.yaml @@ -1,12 +1,22 @@ +- 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 }}" version: "{{ item }}-cv" +- ansible.builtin.cmd: + - curl -o docker-compose.yml.j2 "https://shmick:{{ ANSIBLE_TOKEN }}@git.pukeko.xyz/shmick/docker/raw/branch/{{ item }}/docker-compose.yml.j2" + delegate_to: localhost + - ansible.builtin.template: - src: "{{ container_dir }}/{{ item }}/docker-compose.yml.j2" + src: "docker-compose.yml.j2" dest: "{{ container_dir }}/{{ item }}/docker-compose.yml" - community.docker.docker_compose: project_src: "{{ container_dir }}/{{ item }}" - tags: compose + tags: compose + ignore_errors: yes 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: