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)
This commit is contained in:
@@ -24,10 +24,13 @@ fi
|
||||
echo "==> Decrypting vault (you will be prompted for the vault password)"
|
||||
VAULT_CONTENT=$(ansible-vault view "${VAULT_FILE}")
|
||||
|
||||
echo "${VAULT_CONTENT}" | python3 - <<'PYEOF'
|
||||
import sys, yaml
|
||||
# Pass vault content via environment variable — avoids a pipe+heredoc stdin conflict
|
||||
# where python3 - consumes stdin for the script, leaving sys.stdin.read() empty.
|
||||
export VAULT_CONTENT
|
||||
python3 - <<'PYEOF'
|
||||
import os, sys, yaml
|
||||
|
||||
data = yaml.safe_load(sys.stdin.read())
|
||||
data = yaml.safe_load(os.environ['VAULT_CONTENT'])
|
||||
|
||||
# Required non-empty scalar strings
|
||||
required_scalars = [
|
||||
@@ -41,7 +44,6 @@ required_scalars = [
|
||||
"roundcube_db_password",
|
||||
"roundcube_des_key",
|
||||
"vaultwarden_admin_token",
|
||||
"dl_sftp_authorized_keys",
|
||||
]
|
||||
|
||||
# Required non-empty lists (must contain at least one entry)
|
||||
|
||||
Reference in New Issue
Block a user