task.yaml 545 Bytes
Newer Older
Aaron Yildiztas's avatar
Aaron Yildiztas committed
1
2
3
4
5
6
7
8

- name: Run using a project directory
  hosts: localhost
  gather_facts: no
  tasks:
    - name: Tear down existing services
      community.docker.docker_compose:
        project_src: flask
9
10
11
12
13
14
15
16
        state: absent

    - name: Create and start services
      community.docker.docker_compose:
        project_src: flask
      register: output

    - ansible.builtin.debug:
Aaron Yildiztas's avatar
Aaron Yildiztas committed
17
18
19
20
21
22
23
        var: output
    
    - name: Run `docker-compose up` again
      community.docker.docker_compose:
        project_src: flask
        build: no
      register: output