--- - name: Create compose dir file: path: /opt/docker/compose-files state: directory mode: '0755' - name: Create MySQL dirs file: path: /opt/docker/compose-files/mysql state: directory mode: '0755' - name: Create MySQL dirs file: path: /opt/docker/mysql state: directory mode: '0755' - name: Copy MySQL compose file template: src: files/mysql.j2 dest: /opt/docker/compose-files/mysql/docker-compose.yml - name: Rise MySQL container become: true shell: docker-compose up -d args: chdir: /opt/docker/compose-files/mysql - name: Create Redis dirs file: path: /opt/docker/compose-files/redis state: directory mode: '0755' - name: Create Redis dirs file: path: /opt/docker/redis state: directory mode: '0755' - name: Copy Redis compose file template: src: files/redis.j2 dest: /opt/docker/compose-files/redis/docker-compose.yml - name: Rise Redis container become: true shell: docker-compose up -d args: chdir: /opt/docker/compose-files/redis