mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Great docker refactoring
This commit is contained in:
2
templates/docker_role/README.md
Normal file
2
templates/docker_role/README.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# Docker Role Template
|
||||
This folder contains a template to setup docker roles
|
23
templates/docker_role/meta/main.yml.j2
Normal file
23
templates/docker_role/meta/main.yml.j2
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
galaxy_info:
|
||||
author: "Kevin Veen-Birkenbach"
|
||||
description: "{{ description }}"
|
||||
license: "CyMaIS NonCommercial License (CNCL)"
|
||||
license_url: "https://s.veen.world/cncl"
|
||||
company: |
|
||||
Kevin Veen-Birkenbach
|
||||
Consulting & Coaching Solutions
|
||||
https://www.veen.world
|
||||
platforms:
|
||||
- name: Docker
|
||||
versions:
|
||||
- latest
|
||||
galaxy_tags:
|
||||
{% for tag in tags %}
|
||||
- {{ tag }}
|
||||
{% endfor %}
|
||||
repository: "https://github.com/kevinveenbirkenbach/cymais"
|
||||
issue_tracker_url: "https://github.com/kevinveenbirkenbach/cymais/issues"
|
||||
documentation: "https://github.com/kevinveenbirkenbach/cymais/roles/{{application_id}}"
|
||||
logo:
|
||||
class: "{{ logo_classes }}"
|
0
templates/docker_role/meta/schema.yml.j2
Normal file
0
templates/docker_role/meta/schema.yml.j2
Normal file
36
templates/docker_role/tasks/main.yml.j2
Normal file
36
templates/docker_role/tasks/main.yml.j2
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
|
||||
{% if database | bool %}
|
||||
|
||||
{% raw %}
|
||||
- name: "include docker-central-database"
|
||||
include_role:
|
||||
name: docker-central-database
|
||||
when: run_once_docker_{% endraw %}{{ application_id }}{% raw %} is not defined
|
||||
|
||||
- name: "include role nginx-domain-setup for {{application_id}}"
|
||||
include_role:
|
||||
name: nginx-domain-setup
|
||||
vars:
|
||||
domain: "{{ domains | get_domain(application_id) }}"
|
||||
http_port: "{{ ports.localhost.http[application_id] }}"
|
||||
when: run_once_docker_{% endraw %}{{ application_id }}{% raw %} is not defined
|
||||
{% endraw %}
|
||||
|
||||
{% else %}
|
||||
|
||||
{% raw %}
|
||||
- name: "include docker-compose role"
|
||||
include_role:
|
||||
name: docker-compose
|
||||
when: run_once_docker_{% endraw %}{{ application_id }}{% raw %} is not defined
|
||||
{% endraw %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% raw %}
|
||||
- name: run the {% raw %}portfolio{% endraw %} tasks once
|
||||
set_fact:
|
||||
run_once_docker_portfolio: true
|
||||
when: run_once_docker_{% endraw %}{{ application_id }}{% raw %} is not defined
|
||||
{% endraw %}
|
1
templates/docker_role/vars/main.yml.j2
Normal file
1
templates/docker_role/vars/main.yml.j2
Normal file
@@ -0,0 +1 @@
|
||||
application_id: {{ application_id }}
|
Reference in New Issue
Block a user