Getting an error while creating Trellis dev database

Hello there,

I have successfully launched my first trellis + bedrock + sage last week but since I use OS X at work and Windows 10 at home I am trying to get the website working on my home computer.

So far I have gotten to the stage where the databases get created and am facing the following error:

==> default: fatal: []: FAILED! => {"failed": true, "msg": "{{ wordpress_env_defaults | combine(item.value.env | default({}), vault_wordpress_sites[item.key].env) }}: {u'wp_env': u'{{ env }}', u'db_user': u'{{ item.key | underscore }}', u'disable_wp_cron': True, u'wp_siteurl': u'${WP_HOME}/wp', u'db_name': u'{{ item.key | underscore }}_{{ env }}', u'db_host': u'localhost', u'wp_home': u\"{{ item.value.ssl.enabled | default(false) | ternary('https', 'http') }}://${HTTP_HOST}\"}: template error while templating string: no filter named 'underscore'. String: {{ item.key | underscore }}"}

I have followed fullyint advince from this thread as it was a simillar error but had no luck. Can anyone help me figure this out?


Hey @elsonponte,

That was my issue in that thread you linked. The only reason I was having that issue was because I was used to doing things the old way and moving the Vagrantfile from project-name/trellis to the root of the project: /project-name. So I think our issues are unrelated unless you’re using old install methods/projects.

If you want more use out of this forum, I’d recommend following these steps.


  • Re-run the command in verbose mode ansible-playbook deploy.yml -vvvv -e "site=<domain> env=<environment>" if necessary to get more details (adding the -vvvv).
  • SSH into your server and manually run the command where Ansible failed.

It’s also helpful if you post your github repo.

1 Like