In between commit development coporate design for flock.town

This commit is contained in:
2025-02-19 20:46:14 +01:00
parent fce9c1a72d
commit fd5c10b103
26 changed files with 222 additions and 83 deletions

View File

@@ -0,0 +1,2 @@
# Corporate Identity
Loads the roles to setup a corporate identity

View File

@@ -0,0 +1,3 @@
dependencies:
- nginx-serve-html-legal
- docker-portfolio

View File

@@ -2,10 +2,18 @@
This Ansible role facilitates setting up a Flask-based [portfolio application](https://github.com/kevinveenbirkenbach/portfolio) in a Docker container. It allows you to showcase your projects, services, or online presence using a customizable YAML configuration file.
## Attention
The default template creates the links based on ``group_names``. If you run this script seperate, may not all necessary menu items are generated.
## Features ✨
- **Automated Setup**: Quickly deploy a portfolio using Docker.
- **Customizable Content**: Modify the portfolio using a YAML file.
- **Responsive Design**: Built with Bootstrap for optimal viewing on any device.
- **Dynamic Navigation**: Multi-level menus using nested YAML configurations.
- **Cache Management**: Efficient asset caching for improved performance.
- **Cache Management**: Efficient asset caching for improved performance.
## Author
This role was developed by [Kevin Veen-Birkenbach](https://www.veen.world).

View File

@@ -0,0 +1,25 @@
class FilterModule(object):
'''Custom filters for Ansible'''
def filters(self):
return {
'any_in': self.any_in,
}
def any_in(self, list1, list2):
"""
Checks if at least one element from list1 is found in list2.
:param list1: List of elements to check.
:param list2: Target list in which to search for elements.
:return: True if at least one element is found, otherwise False.
"""
# If either parameter is not a list, return False.
if not isinstance(list1, list) or not isinstance(list2, list):
return False
# Iterate over list1 and check if an element exists in list2.
for element in list1:
if element in list2:
return True
return False

View File

@@ -52,26 +52,26 @@ accounts:
- name: Blog
description: Read {{ 'our' if person.type == 'legal' else 'my' }} articles and stories.
icon:
class: fa-solid fa-blog
class: fa-solid fa-blog
identifier: "{{person.contact.wordpress}}"
url: "https://{{ person.contact.wordpress.split('@')[2] }}/@{{ person.contact.wordpress.split('@')[1] }}"
{% endif %}
{% if person.contact.code is defined %}
- name: Code
{% if person.legal.source_code is defined %}
- name: Our Code
description: Explore {{ 'our' if person.type == 'legal' else 'my' }} code.
icon:
class: fa-solid fa-code
url: "{{person.code}}"
url: "{{person.legal.source_code}}"
{% endif %}
{% if person.contact.friendica is defined %}
- name: Social Networks
- name: Social Network
description: Visit {{ 'our' if person.type == 'legal' else 'my' }} friendica profile
icon:
class: fas fa-network-wired
identifier: "{{person.contact.friendica}}"
url: "https://{{ person.contact.friendica.split('@')[2] }}/@{{ person.contact.friendica.split('@')[1] }}"
{% endif %}
- link: navigation.header.contact.messenger
- link: navigation.header.contact
cards:
- icon:
@@ -114,13 +114,12 @@ company:
favicon:
source: https://cloud.veen.world/s/veen_world_favicon/download
address:
{{ person.address | to_nice_yaml(indent=4) | indent(2) }}
{{ person.address | to_nice_yaml(indent=4) | indent(4, true) }}
imprint_url: https://s.veen.world/imprint
navigation:
header:
children:
- link: accounts.publishingchannels.children
- link: accounts.socialnetworks
- name: Contact
description: Get in touch with {{ 'us' if person.type == 'legal' else 'me' }}
icon:
@@ -133,8 +132,6 @@ navigation:
class: fa-solid fa-envelope
url: mailto:{{person.contact.email}}
identifier: {{person.contact.email}}
alternatives:
- link: navigation.header.contact.messenger.matrix
{% endif %}
{% if person.contact.phone is defined %}
- name: Mobile
@@ -155,149 +152,162 @@ navigation:
footer:
children:
- link: accounts
{% if ["discourse","moodle","listmonk","openproject","taiga","snipe_it","matrix","bigbluebutton","mailu", "matomo","phpadmin","keycloak", "ldap", "baserow","yourls","nextcloud"] | any_in(group_names) %}
- name: Solution Hub
description: Curated collection of self hosted tools
icon:
class: fa-solid fa-network-wired
url:
children:
{% if ["discourse","moodle","listmonk"] | any_in(group_names) %}
- name: Community
description: Tools to manage the community
icon:
class: fa-solid fa-users
children:
{% if "discourse" in group_names %}
{% if "discourse" in group_names %}
- name: Forum
description: Join the discussion
icon:
class: fa-brands fa-discourse
url: https://{{domains.discourse}}/
{% endif %}
{% if "moodle" in group_names %}
{% endif %}
{% if "moodle" in group_names %}
- name: Learning Platform
description: Learn with {{ 'our' if person.type == 'legal' else 'my' }} academy
icon:
class: fa-solid fa-graduation-cap
url: https://{{domains.moodle}}/
{% endif %}
{% if "listmonk" in group_names %}
{% endif %}
{% if "listmonk" in group_names %}
- name: Newsletter
description: Subscribe to {{ 'our' if person.type == 'legal' else 'my' }} newsletter
icon:
class: fa-solid fa-envelope-open-text
url: https://{{domains.listmonk}}/subscription/form
{% endif %}
{% endif %}
{% endif %}
{% if ["openproject","taiga","snipe_it"] | any_in(group_names) %}
- name: Project Management
description: Project Management Tools
icon:
class: fa-solid fa-chart-line
children:
{% if "openproject" in group_names %}
{% if "openproject" in group_names %}
- name: Open Project
description: Explore {{ 'our' if person.type == 'legal' else 'my' }} projects
icon:
class: fa-solid fa-tasks
url: https://{{domains.openproject}}/
{% endif %}
{% if "taiga" in group_names %}
{% endif %}
{% if "taiga" in group_names %}
- name: Taiga
description: View {{ 'our' if person.type == 'legal' else 'my' }} Kanban board
icon:
class: bi bi-clipboard2-check-fill
url: https://{{domains.taiga}}/
{% endif %}
{% if "snipe_it" in group_names %}
{% endif %}
{% if "snipe_it" in group_names %}
- name: Snipe IT
description: Manage {{ 'our' if person.type == 'legal' else 'my' }} inventory
icon:
class: fas fa-box-open
url: https://{{domains.snipe_it}}/
{% endif %}
{% endif %}
{% endif %}
{% if ["matrix","bigbluebutton","mailu"] | any_in(group_names) %}
- name: Communication
icon:
class: fa-solid fa-comments
children:
{% if "matrix" in group_names %}
{% if "matrix" in group_names %}
- name: Elements
description: Chat with the world
icon:
class: fa-solid fa-comment
url: https://{{domains.matrix_element}}/
{% endif %}
{% if "bigbluebutton" in group_names %}
{% endif %}
{% if "bigbluebutton" in group_names %}
- name: Big Blue Button
description: Join live events
icon:
class: fa-solid fa-video
url: https://{{domains.bigbluebutton}}/
{% endif %}
{% if "mailu" in group_names %}
{% endif %}
{% if "mailu" in group_names %}
- name: Mailu
description: Send{{ 'our' if person.type == 'legal' else 'my' }}a mail
icon:
class: fa-solid fa-envelope
url: https://{{domains.mailu}}/
{% endif %}
{% endif %}
{% endif %}
{% if ["matomo","phpadmin","keycloak", "ldap"] | any_in(group_names) %}
- name: Administration
icon:
class: fas fa-building
children:
{% if "matomo" in group_names %}
{% if "matomo" in group_names %}
- name: Matomo
description: Analyze with Matomo
icon:
class: fa-solid fa-chart-simple
url: https://{{domains.matomo}}/
{% endif %}
{% if "phpmyadmin" in group_names %}
{% endif %}
{% if "phpmyadmin" in group_names %}
- name: phpMyAdmin
description: Administrate MySQL and MariaDB databases
icon:
class: fas fa-database
url: https://{{domains.phpmyadmin}}/
{% endif %}
{% if "keycloak" in group_names %}
{% endif %}
{% if "keycloak" in group_names %}
- name: Keycloak
description: Manage User via Keycloak
icon:
class: fas fa-user-shield
url: https://{{domains.keycloak}}/admin
{% endif %}
{% if "ldap" in group_names %}
{% endif %}
{% if "ldap" in group_names %}
- name: LDAP
description: Manage LDAP
icon:
class: fas fa-key
url: https://{{domains.ldap}}/
{% endif %}
{% endif %}
{% endif %}
{% if ["baserow","yourls","nextcloud"] | any_in(group_names) %}
- name: Tools
icon:
class: fas fa-tools
children:
{% if "baserow" in group_names %}
{% if "baserow" in group_names %}
- name: Baserow
description: Organize with Baserow
icon:
class: fa-solid fa-table
url: https://{{domains.baserow}}/
{% endif %}
{% if "yourls" in group_names %}
{% endif %}
{% if "yourls" in group_names %}
- name: Yourls
description: Create Shortlinks
icon:
class: bi bi-link
url: https://{{domains.yourls}}/admin/
{% endif %}
{% if "nextcloud" in group_names %}
{% endif %}
{% if "nextcloud" in group_names %}
- name: Nextcloud
description: Access your cloud storage
icon:
class: fa-solid fa-cloud
url: https://{{domains.nextcloud}}/
{% endif %}
{% endif %}
{% endif %}
- name: Imprint
description: Check out the imprint information
icon:
class: fa-solid fa-scale-balanced
url: https://s.veen.world/imprint
url: "{{person.legal.imprint}}"

View File

@@ -0,0 +1,6 @@
# Nginx Homepage Role
This Ansible role configures an Nginx server to serve files. 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/).

View File

@@ -0,0 +1,5 @@
---
- name: generate {{domains[application_id]}}.conf
template:
src: "nginx.conf.j2"
dest: "{{nginx.directories.http.servers}}{{domains[application_id]}}.conf"

View File

@@ -0,0 +1,24 @@
server
{
server_name {{domains[application_id]}};
{% include 'roles/letsencrypt/templates/ssl_header.j2' %}
{% include 'roles/nginx-modifier-all/templates/global.includes.conf.j2'%}
charset utf-8;
location /
{
alias {{nginx.directories.homepage.files}}; {# Path to your file directory #}
autoindex on; {# Enable directory listing #}
autoindex_exact_size off; {# Display sizes in a human-readable format #}
autoindex_localtime on; {# Show local time #}
}
location /.well-known/ {
alias {{nginx.directories.well_known}};
allow all;
default_type "text/plain";
autoindex on;
}
}

View File

@@ -0,0 +1 @@
application_id: "file_server"

View File

@@ -1,6 +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, and cloning the homepage content from a Git repository.
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/).

View File

@@ -0,0 +1,2 @@
dependencies:
- nginx-serve-html

View File

@@ -0,0 +1,5 @@
---
- name: copy imprint.html
template:
src: "imprint.html.j2"
dest: "{{nginx.directories.html}}imprint.html"

View File

@@ -0,0 +1,46 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Imprint</title>
</head>
<body>
<h1>Imprint</h1>
<h2>Information in accordance with § 5 TMG</h2>
<p>
<strong>{{ person.name }}</strong><br>
{{ person.description.subtitel }}<br>
<br>
<strong>Address:</strong><br>
{{ person.address.street }}<br>
{{ person.address.postal_code }} {{ person.address.city }}<br>
{{ person.address.country }}
</p>
<h2>Contact</h2>
<p>
Telephone: {{ person.contact.phone }}<br>
Email: <a href="mailto:{{ person.contact.email }}">{{ person.contact.email }}</a>
</p>
<h2>Editorial Responsibility</h2>
<p>
{{ person.legal.editorial_responsible }}
</p>
<h2>Source Code</h2>
<p>
Code repository available at: <a href="{{ person.legal.source_code }}">{{ person.legal.source_code }}</a>
</p>
<h2>Consumer Dispute Resolution / Universal Arbitration Board</h2>
<p>
Federal Universal Arbitration Board<br>
Center for Arbitration e.V.<br>
Straßburger Straße 8<br>
77694 Kehl am Rhein
</p>
</body>
</html>

View 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/).

View File

@@ -0,0 +1,3 @@
dependencies:
- nginx-https
- git

View File

@@ -0,0 +1,6 @@
---
- name: generate {{domains[application_id]}}.conf
template:
src: "nginx.conf.j2"
dest: "{{nginx.directories.http.servers}}{{domains[application_id]}}.conf"
notify: restart nginx

View File

@@ -1,7 +1,6 @@
#default
server
{
server_name {{domain}};
server_name {{domains[application_id]}};
{% include 'roles/letsencrypt/templates/ssl_header.j2' %}
@@ -10,7 +9,7 @@ server
location /
{
root {{nginx.directories.homepage}};
root {{nginx.directories.homepage.html}};
index index.html index.htm;
}

View File

@@ -0,0 +1 @@
application_id: "html_server"

View File

@@ -1,16 +0,0 @@
---
- name: "pull homepage from {{nginx_static_repository_address}}"
git:
repo: "{{nginx_static_repository_address}}"
dest: "{{nginx.directories.homepage}}"
update: yes
ignore_errors: true
- name: configure {{primary_domain}}.conf
template:
src: "static.nginx.conf.j2"
dest: "{{nginx.directories.http.servers}}{{primary_domain}}.conf"
vars:
domain: "{{primary_domain}}"
notify: restart nginx
when: run_once_nginx is not defined