mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Implemented assets server
This commit is contained in:
6
roles/nginx-serve-assets/README.md
Normal file
6
roles/nginx-serve-assets/README.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# Nginx Homepage Role
|
||||
|
||||
This Ansible role configures an Nginx server to serve a static homepage. It handles domain configuration, SSL certificate retrieval with Let's Encrypt.
|
||||
|
||||
## Author Information
|
||||
This role was created in 2023 by [Kevin Veen Birkenbach](https://www.veen.world/).
|
2
roles/nginx-serve-assets/meta/main.yml
Normal file
2
roles/nginx-serve-assets/meta/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
dependencies:
|
||||
- nginx-serve-files
|
7
roles/nginx-serve-assets/tasks/main.yml
Normal file
7
roles/nginx-serve-assets/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/nginx-serve-assets/vars/main.yml
Normal file
3
roles/nginx-serve-assets/vars/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
application_id: "assets_server" # 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