Files
PythonFlaskAusgaben/start.yml
jonnybravo 31fe2145e8
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after -40s
gty
2025-03-20 15:25:15 +01:00

31 lines
911 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:
- pythonapp.State == 'running'
vars:
pythonapp: >-
{{ output.containers | selectattr("Service", "python-app") | first }}