Files
PythonFlaskAusgaben/start.yml
jonnybravo 87b0415506
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after -43s
gty
2025-03-20 15:23:11 +01:00

31 lines
913 B
YAML

- name: Start PythonFlask
gather_facts: True
become: False
hosts: localhost
connection: local
vars:
project_folder: "/home/jonnybravo/.docker/pythonflask-ausgaben"
docker_project_name: "pythonflaskausgabe"
tasks:
- name: Copy all Files
copy:
src: "{{ playbook_dir }}/"
dest: "{{project_folder}}"
remote_src: True
- name: Start Docker COmpose
community.docker.docker_compose_v2:
project_src: "{{ project_folder }}"
project_name: "{{docker_project_name}}"
recreate: always
register: compose_output
- name: Show output
debug:
var: compose_output
- name: Verify that web and db services are running
ansible.builtin.assert:
that:
- python-app.State == 'running'
vars:
python-app: >-
{{ output.containers | selectattr("Service", "python-app") | first }}