Fix provisioning errors found during first real run
- ansible.cfg: suppress Python interpreter discovery warning - ansible/inventory.ini: add ansible_host; server IP is now defined in one place and read dynamically by run-bootstrap.sh - group_vars/all/ → directory layout so vault.yml is auto-loaded by Ansible (previously vault.yml did not match any group name and was silently ignored) - scripts/run-bootstrap.sh: read server IP from inventory, chmod 600 private keys automatically, show actual SSH error when root login fails - scripts/bootstrap-deploy-user.sh: add sudoers.d entry for passwordless sudo (deploy user has no password so sudo group membership alone was not enough) - nextcloud: fix Redis healthcheck (CMD-SHELL pipe was unreliable in Alpine, switched to CMD form with start_period) - group_vars/all/vars.yml: fix Roundcube image tag (1.6-apache and 1.6 do not exist; correct tag is 1.6.x-apache) - docs/runbook.md: expand prerequisites (SSH keys section), add step 1 for setting the server IP, expand bootstrap step with preflight detail, fix step numbering
This commit is contained in:
@@ -22,6 +22,10 @@ fi
|
||||
echo "==> Adding '${DEPLOY_USER}' to sudo group"
|
||||
usermod -aG sudo "${DEPLOY_USER}"
|
||||
|
||||
echo "==> Granting '${DEPLOY_USER}' passwordless sudo"
|
||||
echo "${DEPLOY_USER} ALL=(ALL) NOPASSWD: ALL" > "/etc/sudoers.d/${DEPLOY_USER}"
|
||||
chmod 440 "/etc/sudoers.d/${DEPLOY_USER}"
|
||||
|
||||
echo "==> Installing SSH authorized key"
|
||||
SSH_DIR="/home/${DEPLOY_USER}/.ssh"
|
||||
AUTH_KEYS="${SSH_DIR}/authorized_keys"
|
||||
|
||||
Reference in New Issue
Block a user