mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Restructured service und web role naming in inventor
This commit is contained in:
2
roles/web-svc-asset/README.md
Normal file
2
roles/web-svc-asset/README.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# Assets Server
|
||||
This role provides assets
|
2
roles/web-svc-asset/config/main.yml
Normal file
2
roles/web-svc-asset/config/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
source_directory: "{{ playbook_dir }}/assets"
|
||||
url: "{{ web_protocol ~ '://' ~ 'files.' ~ primary_domain ~ '/assets' }}"
|
24
roles/web-svc-asset/meta/main.yml
Normal file
24
roles/web-svc-asset/meta/main.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
galaxy_info:
|
||||
author: "Kevin Veen-Birchenbach"
|
||||
description: "Serves static assets via Nginx by copying from a source directory to the Nginx data path."
|
||||
license: "CyMaIS NonCommercial License (CNCL)"
|
||||
license_url: "https://s.veen.world/cncl"
|
||||
company: |
|
||||
Kevin Veen-Birchenbach
|
||||
Consulting & Coaching Solutions
|
||||
https://www.veen.world
|
||||
galaxy_tags:
|
||||
- assets
|
||||
- nginx
|
||||
- static
|
||||
repository: "https://github.com/kevinveenbirkenbach/cymais"
|
||||
issue_tracker_url: "https://github.com/kevinveenbirkenbach/cymais/issues"
|
||||
documentation: "https://github.com/kevinveenbirkenbach/cymais/tree/main/roles/web-svc-asset"
|
||||
min_ansible_version: "2.9"
|
||||
platforms:
|
||||
- name: Any
|
||||
versions:
|
||||
- all
|
||||
dependencies:
|
||||
- web-svc-file
|
7
roles/web-svc-asset/tasks/main.yml
Normal file
7
roles/web-svc-asset/tasks/main.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: "Recursively copy files from local '{{ source_directory }}' to '{{ target_directory }}'"
|
||||
ansible.builtin.copy:
|
||||
src: "{{ source_directory }}"
|
||||
dest: "{{ target_directory }}"
|
||||
owner: "{{ nginx.user }}"
|
||||
group: "{{ nginx.user }}"
|
3
roles/web-svc-asset/vars/main.yml
Normal file
3
roles/web-svc-asset/vars/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
application_id: "asset" # Application identifier
|
||||
source_directory: "{{ applications[application_id].source_directory }}/" # Source directory from which the files are coming from
|
||||
target_directory: "{{ nginx.directories.data.files }}assets" # Directory to which the files will be copied
|
Reference in New Issue
Block a user