Playbook de lancement/arrêt d'une app.

This commit is contained in:
William 2022-07-01 22:08:11 +02:00
parent 6c85124ea5
commit 5805c3bc95
2 changed files with 34 additions and 0 deletions

17
start-app.yml Normal file
View File

@ -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

17
stop-app.yml Normal file
View File

@ -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