--- - hosts: all gather_facts: no tasks: # Set up environment - name: Running apt update apt: update_cache=yes - name: Enable ru_RU.UTF-8 lineinfile: dest=/etc/locale.gen line='ru_RU.UTF-8 UTF-8' - name: Gen locale command: locale-gen - name: Installing required packages apt: name={{item}} state=present with_items: - python3-pip - docker.io - name: install compose pip: name: docker-compose executable: pip3 # Deploy project - name: copy files synchronize: src=/home/anya/PycharmProjects/cb_parser_celery/mysite dest=/src - name: run the service defined in my_project's docker-compose.yml docker_service: build: yes project_src: /src/mysite/Docker