Files
PythonFlaskAusgaben/start.yml
jonnybravo 9724100223
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in -41s
finsh
2025-03-20 15:48:06 +01:00

37 lines
1.1 KiB
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: "check this"
# debug:
# msg:
# - "{{ compose_output.containers | selectattr('Service', 'equalto', 'python-app')| first }}"
- name: Verify that web and db services are running
ansible.builtin.assert:
that:
- pythonapp.State == 'running'
vars:
pythonapp: >-
{{ compose_output.containers | selectattr("Service","equalto", "python-app") | first }}