Files
server_cloud_ladkau_de/ansible/roles/dl/tasks/main.yml
T
ml c77b82d835 Fix Redis persistence crash-loop and provisioning dependencies
- Disable Redis RDB snapshots (--save "") — Redis is cache-only for
  Nextcloud; snapshot writes failed due to directory permissions and
  blocked all Redis writes, causing background jobs to crash-loop at
  400%+ CPU
- Add passlib as a required local dependency (needed for password_hash
  filter in Ansible templates)
- Make dl role SFTP setup conditional on dl_sftp_authorized_keys being
  set in the vault
- Fix check-vault.sh stdin conflict (pipe + heredoc) by passing vault
  content via environment variable
- Remove dl_sftp_authorized_keys from required_scalars (it is optional)
2026-06-28 17:20:18 +02:00

65 lines
1.4 KiB
YAML

---
- name: Create dl data directory
ansible.builtin.file:
path: "{{ dl_data_dir }}"
state: directory
owner: root
group: root
mode: "0755"
tags: dl
- name: Create dl files directory (sftp user UID 1001)
ansible.builtin.file:
path: "{{ dl_data_dir }}/files"
state: directory
owner: "1001"
group: "1001"
mode: "0755"
tags: dl
- name: Deploy SFTP authorized keys
ansible.builtin.copy:
content: "{{ dl_sftp_authorized_keys }}"
dest: "{{ dl_data_dir }}/authorized_keys"
owner: root
group: root
mode: "0644"
when: dl_sftp_authorized_keys | default('') | length > 0
notify: Restart dl
tags: dl
- name: Deploy nginx config
ansible.builtin.template:
src: nginx.conf.j2
dest: "{{ dl_data_dir }}/nginx.conf"
owner: root
group: root
mode: "0644"
notify: Restart dl
tags: dl
- name: Deploy Docker Compose file
ansible.builtin.template:
src: docker-compose.yml.j2
dest: "{{ dl_data_dir }}/docker-compose.yml"
owner: root
group: root
mode: "0644"
notify: Restart dl
tags: dl
- name: Allow SFTP port through firewall
community.general.ufw:
rule: allow
port: "{{ dl_sftp_port }}"
proto: tcp
when: dl_sftp_authorized_keys | default('') | length > 0
tags: dl
- name: Start dl stack
community.docker.docker_compose_v2:
project_src: "{{ dl_data_dir }}"
state: present
pull: missing
tags: dl