【问题标题】:After changing paswords in vault.yml, deployment fails in trellis在 vault.yml 中更改密码后,格状结构中的部署失败
【发布时间】:2019-05-31 07:19:26
【问题描述】:

我有一个使用 Trellis 的 wordpress 网站设置。最初,我设置了服务器并在没有加密 vault.yml 的情况下进行了部署。 一切正常后,我更改了 vault.yml 中的密码并加密了文件。但是我的部署现在失败了。 我收到以下错误 -

  TASK [deploy : WordPress Installed?] 
 **************************
System info:
Ansible 2.6.3; Darwin
Trellis version (per changelog): "Allow customizing Nginx `worker_connections`"
---------------------------------------------------
non-zero return code

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.

fatal: [mysite.org]: FAILED! => {"changed": false, 
"cmd": ["wp", "core", "is-installed", "--skip-plugins", "--skip- 
themes", "--require=/srv/www/mysite.org/shared/tmp_multisite_constants.php"], "delta": 
"0:00:00.224955", "end": "2019-01-04 16:59:01.531111", 
"failed_when_result": true, "rc": 1, "start": "2019-01-04 
16:59:01.306156", "stderr_lines": ["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."], "stdout": "", "stdout_lines": []}
to retry, use: --limit 
@/Users/praneethavelamuri/Desktop/path/to/my/project/trellis/deploy.retry

我错过了什么步骤吗?我遵循了这些步骤-

  1. ansible-playbook server.yml -e env=staging
  2. ./bin/deploy.sh staging mysite.org
  3. 在 staging/vault.yml 中更改密码
  4. 设置保管库密码
  5. 告知 ansible 密码
  6. 加密文件
  7. 提交文件并推送仓库
  8. 重新部署,然后我得到错误!

【问题讨论】:

    标签: wordpress ansible ansible-vault roots-sage trellis


    【解决方案1】:

    我解决了。我也在我的保险库中更改了 sudo 用户密码。所以ssh进入服务器并将sudo密码更改为保险库中提到的密码,然后配置它然后部署解决了这个问题。

    【讨论】:

      猜你喜欢
      • 2021-07-13
      • 2012-06-05
      • 1970-01-01
      • 2014-08-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-23
      • 2017-08-13
      相关资源
      最近更新 更多