feat: add ansible/nextcloud

This commit is contained in:
cătălin 2024-02-10 19:40:04 +01:00
commit 81b6f45b08
Signed by: catalin
GPG key ID: 0178DF42F43E5FD2
6 changed files with 39 additions and 1 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
.idea/ .idea/
secrets.yaml secrets.yaml
.env

3
ansible/ansible.cfg Normal file
View file

@ -0,0 +1,3 @@
[defaults]
inventory = inventory
host_key_checking = False

5
ansible/inventory Normal file
View file

@ -0,0 +1,5 @@
[nextclouds]
cloud.fuku
[nextclouds:vars]
ansible_user=root

View file

@ -0,0 +1,26 @@
- name: Install promtail
hosts:
- nextclouds
roles:
- role: patrickjahns.promtail
vars:
promtail_version: 2.9.4
promtail_config_clients:
- url: https://loki.fuku/loki/api/v1/push
basic_auth:
username: cloud
password: "{{ lookup('env', 'NEXTCLOUD_PROMTAIL_PASSWORD') | mandatory }}"
tls_config:
insecure_skip_verify: true
promtail_config_scrape_configs:
- job_name: system
static_configs:
- targets:
- localhost
labels:
nextcloud: cloud.fukurokuju.dev
__path__: /mnt/share/data/cloud/data/{nextcloud,audit}.log
promtail_config_limits_config:
readline_rate_enabled: true
readline_rate_drop: true

View file

@ -0,0 +1 @@
NEXTCLOUD_PROMTAIL_PASSWORD=superdupersecure

2
ansible/requirements.yml Normal file
View file

@ -0,0 +1,2 @@
- name: patrickjahns.promtail
version: 1.26.0