From 5805c3bc9531e0e291447faa3850621ac2f3dbfe Mon Sep 17 00:00:00 2001 From: William Date: Fri, 1 Jul 2022 22:08:11 +0200 Subject: [PATCH] =?UTF-8?q?Playbook=20de=20lancement/arr=C3=AAt=20d'une=20?= =?UTF-8?q?app.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- start-app.yml | 17 +++++++++++++++++ stop-app.yml | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 start-app.yml create mode 100644 stop-app.yml 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