chore: initial commit with Docker + Ansible base
This commit is contained in:
4
ansible/deploy.yml
Normal file
4
ansible/deploy.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
- hosts: web
|
||||
become: false
|
||||
roles:
|
||||
- deploy
|
||||
2
ansible/inventory.ini
Normal file
2
ansible/inventory.ini
Normal file
@@ -0,0 +1,2 @@
|
||||
[web]
|
||||
localhost ansible_connection=local
|
||||
14
ansible/roles/deploy/tasks/main.yml
Normal file
14
ansible/roles/deploy/tasks/main.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
- name: Stoppe laufende Container
|
||||
command: docker compose down
|
||||
args:
|
||||
chdir: "{{ playbook_dir }}/../"
|
||||
|
||||
- name: Baue Images neu (ohne Cache)
|
||||
command: docker compose build --no-cache
|
||||
args:
|
||||
chdir: "{{ playbook_dir }}/../"
|
||||
|
||||
- name: Starte Container neu
|
||||
command: docker compose up -d
|
||||
args:
|
||||
chdir: "{{ playbook_dir }}/../"
|
||||
3
ansible/roles/setup/tasks/main.yml
Normal file
3
ansible/roles/setup/tasks/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
- name: Test-Task Setup-Rolle lokal
|
||||
debug:
|
||||
msg: "Setup-Rolle ist vorbereitet – echte Installation folgt auf Server."
|
||||
4
ansible/setup.yml
Normal file
4
ansible/setup.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
- hosts: web
|
||||
become: false
|
||||
roles:
|
||||
- setup
|
||||
Reference in New Issue
Block a user