lemmy/defaults/main.yml

143 lines
4.2 KiB
YAML

---
# Server
lemmy_apt:
- pkg-config
- libssl-dev
- libpq-dev
- build-essential
lemmy_username: 'lemmy'
lemmy_group: 'lemmy'
lemmy_logfile: '/var/log/lemmy.log'
lemmy_logfile_error: '/var/log/lemmy_err.log'
lemmy_app_dir: '/var/lib/lemmy'
# Backend
lemmy_backend_version: '0.19.3'
lemmy_backend_source_dir: '/var/lib/lemmy-git'
lemmy_backend_dir: '{{ lemmy_app_dir }}/lemmy-server'
# Server config: config.hjson
# see https://raw.githubusercontent.com/LemmyNet/lemmy/main/config/defaults.hjson
lemmy_hostname: 'lemmy.example.lan'
lemmy_db_host: '127.0.0.1'
lemmy_db_user: 'lemmy'
lemmy_db_passwd: 'changeme'
lemmy_db_name: 'lemmy'
lemmy_db_port: '5432'
lemmy_pool_size: '30'
lemmy_admin_username: 'admin'
lemmy_admin_password: 'changemeasap'
lemmy_site_name: 'My Lemmy Instance'
lemmy_admin_email: 'user@example.lan'
lemmy_bind: '0.0.0.0'
lemmy_port: '8536'
lemmy_tls_enabled: 'true'
lemmy_worker_count: '64'
lemmy_retry_count: '0'
lemmy_smtp_server: 'localhost:25'
lemmy_smtp_login: 'username'
lemmy_smtp_password: 'changeme'
lemmy_smtp_from_address: 'noreply@example.com'
lemmy_smtp_tls_type: 'none'
# UI
## Node
nodejs_version: '20'
lemmy_ui_pkg:
- yarn
lemmy_ui_version: '0.19.3'
lemmy_ui_dir: '/var/lib/lemmy/lemmy-ui'
lemmy_ui_port: '1234'
lemmy_ui_logfile: '/var/log/lemmy-ui.log'
lemmy_ui_logfile_error: '/var/log/lemmy-ui_err.log'
# Pict-rs
lemmy_pictrs_deploy: 'true' # set it to true if you want to deploy pict-rs
lemmy_pictrs_apt:
- ffmpeg
- exiftool
- libgexiv2-dev
#- imagemagick # commented as we build it
lemmy_pictrs_username: 'pictrs'
lemmy_pictrs_group: 'pictrs'
lemmy_pictrs_source_dir: '/var/lib/pictrs-source'
lemmy_pictrs_dir: '/var/lib/lemmy/pictrs'
lemmy_pictrs_url: "0.0.0.0:8080"
lemmy_pictrs_api: "changemeasap"
lemmy_pictrs_version: 'v0.5.4'
lemmy_pictrs_logfile: '/var/log/lemmy-pictrs.log'
lemmy_pictrs_logfile_error: '/var/log/lemmy-pictrs_err.log'
## ImageMagick
lemmy_imagemagick_deploy: 'true' # set it to true if you want to deploy imagemagick
lemmy_imagemagick_source_dir: '/var/lib/imei'
lemmy_imagemagick_version: '6.11.0'
#Postgres
postgresql_version: 15 # 1t doesn't work with 13
postgresql_listen_addresses:
- "127.0.0.1"
postgresql_pg_hba_default:
- { type: local, database: all, user: '{{ postgresql_admin_user }}', address: '', method: '{{ postgresql_default_auth_method }}', comment: '' }
- { type: local, database: all, user: all, address: '', method: '{{ postgresql_default_auth_method }}', comment: '"local" is for Unix domain socket connections only' }
- { type: host, database: all, user: all, address: '127.0.0.1/32', method: '{{ postgresql_default_auth_method_hosts }}', comment: 'IPv4 local connections:' }
postgresql_databases:
- name: '{{ lemmy_db_name }}'
owner: '{{ lemmy_db_user }}' # optional; specify the owner of the database
uuid_ossp: yes
postgresql_database_extensions:
- db: '{{ lemmy_db_name }}'
extensions:
- citext
- pg_trgm
# hstore: no # flag to install the hstore extension on this database (yes/no)
#uuid_ossp: yes # flag to install the uuid-ossp extension on this database (yes/no)
#citext: yes # flag to install the citext extension on this database (yes/no)
postgresql_users:
- name: '{{ lemmy_db_user }}'
pass: '{{ lemmy_db_passwd }}'
encrypted: yes # denotes if the password is already encrypted.
postgresql_user_privileges:
- name: '{{ lemmy_db_user }}' # user name
db: '{{ lemmy_db_name }}' # database
priv: "ALL" # privilege string format: example: INSERT,UPDATE/table:SELECT/anothertable:ALL
role_attr_flags: "" # role attribute flags
# NGINX SETUP
nginx_default_vhost_ssl: 'lemmy'
nginx_default_vhost: 'lemmy'
nginx_www_dir: '/var/www/'
nginx_gen_dh: 'true'
ssl_src_path: '/etc/letsencrypt/live'
nginx_dh_length: 2048
## NGINX VHOST
nginx_vhosts:
- name: 'lemmy.example.lan'
template: 'lemmy'
proto: 'https'
listen: '443'
upstream_proto: 'http'
upstream_name: '0.0.0.0'
use_error_log: 'true'
nginx_error_log_level: 'warn'
max_upload: '56M'
http2: 'true'
ssl_name: 'lemmy.example.lan'
selfsigned: 'true'
letsencrypt: 'false'
state: 'enable'