wari wari da it's so over ( im using ansible again )
:(((
This commit is contained in:
parent
55217ce50b
commit
ef4967cd88
@ -10,3 +10,11 @@
|
||||
apply:
|
||||
tags:
|
||||
- setup
|
||||
- name: Setup the docker based services
|
||||
tags:
|
||||
- services
|
||||
ansible.builtin.include_role:
|
||||
name: services
|
||||
apply:
|
||||
tags:
|
||||
- services
|
||||
|
15
ansible/roles/services/tasks/main.yaml
Normal file
15
ansible/roles/services/tasks/main.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
- name: Ensure docker compose directory is present
|
||||
ansible.builtin.file:
|
||||
path: compose
|
||||
state: directory
|
||||
- name: Copy in the docker-compose template
|
||||
ansible.builtin.template:
|
||||
src: compose.yaml
|
||||
dest: compose/compose.yaml
|
||||
owner: nigel
|
||||
mode: "0644"
|
||||
- name: Run the docker compose yaml
|
||||
become: true
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: compose
|
||||
remove_orphans: true
|
6
ansible/roles/services/templates/compose.yaml
Normal file
6
ansible/roles/services/templates/compose.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
services:
|
||||
health:
|
||||
image: nginx:latest
|
||||
container_name: health
|
||||
ports:
|
||||
- "8080:80"
|
Loading…
Reference in New Issue
Block a user