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

**URL:** https://discourse.roots.io/t/after-changing-passwords-in-in-vault-yml-i-get-error-when-i-try-to-redeploy-the-server/14508
**Category:** bedrock
**Tags:** ansible, deploys, trellis
**Created:** 2019-01-05T12:25:28Z
**Posts:** 4

## Post 1 by @Praneetha — 2019-01-05T12:25:28Z

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?

---

## Post 2 by @ben — 2019-01-05T21:06:15Z

Did you reprovision the server first?

---

## Post 3 by @Praneetha — 2019-01-07T04:42:28Z

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](http://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

---

## Post 4 by @Praneetha — 2019-01-07T08:07:44Z

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.
