diff --git a/start-app.yml b/start-app.yml new file mode 100644 index 0000000..5f1b7d9 --- /dev/null +++ b/start-app.yml @@ -0,0 +1,17 @@ +--- +- name: Start app + hosts: webservers + become: yes + + tasks: + - name: Run container + community.docker.docker_compose: + project_src: "{{ working_dir }}/{{ name }}" + build: yes + files: + - docker-compose.pilot.yml + restarted: yes + register: output + + - debug: + var: output diff --git a/stop-app.yml b/stop-app.yml new file mode 100644 index 0000000..6283b22 --- /dev/null +++ b/stop-app.yml @@ -0,0 +1,17 @@ +--- +- name: Start app + hosts: webservers + become: yes + + tasks: + - name: Run container + community.docker.docker_compose: + project_src: "{{ working_dir }}/{{ name }}" + build: no + files: + - docker-compose.pilot.yml + stopped: yes + register: output + + - debug: + var: output \ No newline at end of file