mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Refactored docker logic
This commit is contained in:
1
tasks/.gitignore
vendored
1
tasks/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
include-docker-roles.yml
|
@@ -1,3 +0,0 @@
|
||||
# todo
|
||||
- Move update-repository-with-files.yml to own role
|
||||
- Move copy-docker-compose-and-env.yml to own role
|
@@ -1,27 +0,0 @@
|
||||
- name: "create {{ docker_compose.files.docker_compose }}"
|
||||
template:
|
||||
src: "docker-compose.yml.j2"
|
||||
dest: "{{ docker_compose.files.docker_compose }}"
|
||||
notify: docker compose project setup
|
||||
register: docker_compose_template
|
||||
|
||||
- name: "create {{ docker_compose.files.env }}"
|
||||
template:
|
||||
src: "env.j2"
|
||||
dest: "{{ docker_compose.files.env }}"
|
||||
mode: '770'
|
||||
force: yes
|
||||
notify: docker compose project setup
|
||||
register: env_template
|
||||
|
||||
- name: "Check if any container is running in {{ docker_compose.directories.instance }}"
|
||||
command: docker compose ps -q --filter status=running
|
||||
args:
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
register: docker_ps
|
||||
changed_when: (docker_ps.stdout | trim) == ""
|
||||
notify: docker compose project setup
|
||||
when: not (docker_compose_template.changed or env_template.changed)
|
||||
|
||||
- name: flush docker compose project setup
|
||||
meta: flush_handlers
|
@@ -12,7 +12,7 @@
|
||||
- system-btrfs-auto-balancer
|
||||
|
||||
- name: "Integrate Docker Role includes"
|
||||
include_tasks: "include-docker-roles.yml"
|
||||
include_tasks: "./tasks/utils/docker-roles.yml"
|
||||
|
||||
# Native Webserver Roles
|
||||
- name: setup nginx-serve-htmls
|
1
tasks/utils/.gitignore
vendored
Normal file
1
tasks/utils/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
docker-roles.yml
|
Reference in New Issue
Block a user