diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-08-17 09:13:37 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-08-17 09:28:44 +0200 |
commit | cdaeef30fd0367da439c48c72bb96ef199c28d28 (patch) | |
tree | 45cf4959bc91c6dcacf46c48231db62f5282f765 | |
parent | my_workspace: use community.general.make (diff) | |
download | infra-ansible-cdaeef30fd0367da439c48c72bb96ef199c28d28.tar.gz infra-ansible-cdaeef30fd0367da439c48c72bb96ef199c28d28.zip |
my_workspace: use community.docker.docker_compose
-rw-r--r-- | roles/my_workspace/tasks/project.yml | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/roles/my_workspace/tasks/project.yml b/roles/my_workspace/tasks/project.yml index 41fed86..813de46 100644 --- a/roles/my_workspace/tasks/project.yml +++ b/roles/my_workspace/tasks/project.yml @@ -36,26 +36,12 @@ chdir: '{{ project_dir }}' when: makefile_check is succeeded -- name: This project uses docker-compose +- name: Run docker-compose become: true + community.docker.docker_compose: + build: true + debug: true + project_src: '{{ project_dir }}' + pull: true + remove_orphans: true when: makefile_check is not succeeded and docker_compose_check is succeeded - block: - - name: docker-compose pull - ansible.builtin.command: docker-compose pull - args: - chdir: '{{ project_dir }}' - - - name: docker-compose build - ansible.builtin.command: docker-compose build --force-rm --pull -q - args: - chdir: '{{ project_dir }}' - - - name: docker-compose up - ansible.builtin.command: docker-compose up --remove-orphans -d - args: - chdir: '{{ project_dir }}' - register: docker_compose_up - - - name: Show docker-compose up output - ansible.builtin.debug: - var: docker_compose_up |