From b53559959d3c7d3d1c8474a2c4002486930fe451 Mon Sep 17 00:00:00 2001 From: greglebreton Date: Fri, 22 Jul 2022 22:12:36 +0200 Subject: [PATCH] add docker deploy stack task functional! --- playbook.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/playbook.yml b/playbook.yml index b2a1f8f..a2a4664 100644 --- a/playbook.yml +++ b/playbook.yml @@ -112,6 +112,11 @@ owner: admin group: admin + - name: Pip install Docker-compose (au cas ou) + become: True + shell: + cmd: "python3 -m pip install docker-compose" + ################# CERTBOT ################# - name: Install Certbot @@ -161,15 +166,13 @@ repo: "{{ item.src }}" dest: "{{ item.dest }}" with_items: - - { src: 'https://git.gregandev.fr/gregandev/jellyfin.git', dest: '/workspace/jellyfin/' } + - { src: 'https://git.gregandev.fr/gregandev/jellyfin.git', dest: '/workspace/jellyfin' } - { src: 'https://git.gregandev.fr/gregandev/syncthing.git', dest: '/workspace/syncthing' } -# ERROR PULLING IMAGES ... - - name: Run container - become: True - shell: - cmd: "docker-compose -f docker-compose.yml up -d" - chdir: "{{ item }}" + - name: Start stack with Docker-compose up! + community.docker.docker_compose: + project_src: "{{ item }}" with_items: - /workspace/jellyfin - - /workspace/syncthing \ No newline at end of file + - /workspace/syncthing + register: output