Roots Discourse

After changing passwords in in vault.yml I get error when I try to redeploy the server

ansible
trellis

#1

Initially I had set up the server and deployed without encrypting the vault.yml. Once everything was working fine I changed the passwords in vault.yml and encrypted the file. But my deployment fails now. And I get the following error-

Error: Error establishing a database connection. This either means that 
the username and password information in your `wp-config.php` file is 
incorrect or we can’t contact the database server at `localhost`. This 
could mean your host’s database server is down.

Cant I change the passwords after server is deployed? Where am I going wrong here?


#2

Did you reprovision the server first?


#3

Hi Ben, Yes I tried to reprovision the server by running

ansible-playbook server.yml -e env=staging

But here also it gives following error

TASK [Install Python 2.x] **************************************************************
System info:
Ansible 2.6.3; Darwin
Trellis version (per changelog): “Allow customizing Nginx
worker_connections”

Incorrect sudo password
fatal: [mysite.org]: FAILED! => {}
to retry, use: --limit @/Users/praneethavelamuri/Desktop/path/to/my/project/trellis/server.retry

PLAY RECAP **************************************************************************************************************************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=0
mysite…org : ok=4 changed=0 unreachable=0 failed=1


#4

Hi! I got it solved. I have changed the sudo user password too in my vault. so ssh into server and changing sudo password to the password mentioned in vault and then provisioning it solved the issue.