I have a local Trellis setup that is working and I’ve successfully provisioned and deployed my staging and production websites (Digital Ocean droplets). When I try to re-provision one of my servers, I keep running into an error while it’s executing the mariadb : Set root user password
task. When I run all other tasks by running the playbook with a bunch of tags, re-provisioning works just fine.
TASK [mariadb : Set root user password] ***************************************************************************************************************************************************************************
System info:
Ansible 2.9.0; Linux
Trellis Head
---------------------------------------------------
unable to connect to database: (1045, "Access denied for user
'root'@'localhost' (using password: NO)")
failed: [deleted for privacy reasons] (item=deleted for privacy reasons) => {"ansible_loop_var": "item", "changed": false, "item": "deleted for privacy reasons"}
---------------------------------------------------
unable to connect to database: (1045, "Access denied for user
'root'@'localhost' (using password: NO)")
failed: [deleted for privacy reasons] (item=127.0.0.1) => {"ansible_loop_var": "item", "changed": false, "item": "127.0.0.1"}
---------------------------------------------------
unable to connect to database: (1045, "Access denied for user
'root'@'localhost' (using password: NO)")
failed: [deleted for privacy reasons] (item=::1) => {"ansible_loop_var": "item", "changed": false, "item": "::1"}
---------------------------------------------------
unable to connect to database: (1045, "Access denied for user
'root'@'localhost' (using password: NO)")
failed: [deleted for privacy reasons] (item=localhost) => {"ansible_loop_var": "item", "changed": false, "item": "localhost"}
I pulled in a new set of Trellis config files and changed the bare minimum. Provisioning was once again successful, but re-provisioning failed on the same MariaDB task.
group_vars/staging/wordpress_sites.yml
:
wordpress_sites:
staging.website.nl:
site_hosts:
- canonical: staging.website.nl
# redirects:
# - otherdomain.com
local_path: ../site # path targeting local Bedrock site directory (relative to Ansible root)
repo: git@gitlab.com:account/website.nl.git # replace with your Git repo URL
repo_subtree_path: site # relative path to your Bedrock/WP directory in your repo
branch: master
multisite:
enabled: false
ssl:
enabled: false
provider: letsencrypt
cache:
enabled: false
group_vars/staging/vault.yml
:
# Documentation: https://roots.io/trellis/docs/vault/
vault_mysql_root_password: stagingpw
# Documentation: https://roots.io/trellis/docs/security/
vault_users:
- name: "{{ admin_user }}"
password: example_password
salt: "generateme"
# Variables to accompany `group_vars/staging/wordpress_sites.yml`
# Note: the site name (`example.com`) must match up with the site name in the above file.
vault_wordpress_sites:
staging.website.nl:
env:
db_password: example_dbpassword
# Generate your keys here: https://roots.io/salts.html
auth_key: "generateme"
secure_auth_key: "generateme"
logged_in_key: "generateme"
nonce_key: "generateme"
auth_salt: "generateme"
secure_auth_salt: "generateme"
logged_in_salt: "generateme"
nonce_salt: "generateme"
Appreciate any help in the matter, thanks!