init
Some checks failed
Deploy to ras-dan-01 / deploy (push) Has been cancelled

This commit is contained in:
2025-08-26 14:35:48 +02:00
commit 370974a57d
22 changed files with 1523 additions and 0 deletions

28
start.yml Normal file
View File

@@ -0,0 +1,28 @@
---
- name: Deploy and start Movie-DB Application
hosts: localhost
connection: local
become: yes
vars:
project_name: movie-db
install_dir: "/opt/{{ project_name }}"
project_src: "{{ playbook_dir }}"
tasks:
- name: Create installation directory
ansible.builtin.file:
path: "{{ install_dir }}"
state: directory
mode: '0755'
- name: Copy docker-compose file
ansible.builtin.copy:
src: "{{ project_src }}/docker-compose.yml"
dest: "{{ install_dir }}/docker-compose.yml"
- name: Start application with Docker Compose
community.docker.docker_compose:
project_src: "{{ install_dir }}"
state: present
restarted: yes