Any chance you’re using the same hostname in hosts/production
as in hosts/staging
? That could lead to unexpected variable values (e.g., getting the staging value for vault_wordpress_sites
even though you specify env=production
), as discussed in Production server provision configures Staging envs if hosts are the same - Bug or Intention?. If so, see solutions at link.
If that is not the issue, feel free to post your group_vars/production/wordpress_sites.yml
and unencrypted group_vars/production/vault.yml
for review, with sensitive values masked, of course.