Files
a13labs.infra/ansible/playbook_websites.yml
alexandre.pires e6e85b00f7 feat(mail): enhance mail configuration with getmail and dovecot settings
- Added getmail configuration generation using template files.
- Introduced postfix and dovecot configuration checksums for deployment.
- Created new dovecot configuration file and sieve script for email handling.
- Updated main.tf to utilize local variables for configuration management.
- Removed redundant external password hasher from main.tf.

feat(nginx): improve nginx configuration management

- Centralized nginx configuration into a local variable with checksum.
- Created separate config maps for default website configurations.
- Updated deployment to utilize new configuration structure.

feat(sftpgo): add SFTPGo application deployment

- Introduced SFTPGo with Kubernetes resources including namespace, config maps, and secrets.
- Configured SFTPGo with SMTP settings and AWS credentials.
- Implemented health checks and volume mounts for persistent storage.

refactor(seafile): remove Seafile module

- Deleted Seafile module and associated resources as part of cleanup.
2025-05-05 00:47:36 +02:00

51 lines
1.3 KiB
YAML

---
- name: Websites (Static Files) Playbook (K8s)
hosts: web
gather_facts: true
# Specific tasks for this playbook
tasks:
- name: Set required facts
ansible.builtin.set_fact:
web_home: "{{ persistent_data | default('/var/lib') }}/web"
web_user_id: 1000
web_group_id: 1000
tags: always
- name: Create required web data folder
become: true
ansible.builtin.file:
state: directory
path: "{{ web_home }}"
mode: "0750"
owner: "{{ web_user_id }}"
group: "{{ web_group_id }}"
tags:
- tasks
- tasks::folders
- name: Create required web data folder
become: true
ansible.builtin.file:
state: directory
path: "{{ web_home }}/{{ item }}"
mode: "0750"
owner: "{{ web_user_id }}"
group: "{{ web_group_id }}"
with_items:
- "{{ websites | default([]) }}"
tags:
- tasks
- tasks::folders
- name: Synchronize websites
become: true
ansible.posix.synchronize:
mode: push
src: "{{ lookup('env', 'GITHUB_WORKSPACE') + '/websites/releases/' + item }}/"
dest: "{{ web_home }}/{{ item }}"
delete: true
recursive: true
with_items:
- "{{ websites | default([]) }}"