Vagrant up error at task setup logrotate

I’m on ansible 2.2.0.0 could that be the reason I receive this error on vagrant up?

TASK [logrotate : nickhammond.logrotate | Setup logrotate.d scripts] ***********
System info:
  Ansible 2.2.0.0; Vagrant 1.8.5; Linux
  Trellis at "Create WordPress php-fpm conf after web_root exists"
---------------------------------------------------
the field 'args' has an invalid value, which appears to include a variable
that is undefined. The error was: 'unicode object' has no attribute 'name'

The error appears to have been in
'/my/local/path/trellis/vendor/roles/logrotate/tasks/main.yml':
line 5, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: nickhammond.logrotate | Setup logrotate.d scripts
  ^ here

fatal: [default]: FAILED! => {"failed": true}

Yes, the error is likely associated with your upgrade to Ansible 2.2. Trellis and the logrotate role were updated for Ansible 2.2 compatibility in roots/trellis#681. You could either switch back to Ansible 2.1 or update your Trellis (at least the requirements.yml file) then reinstall your galaxy roles as follows:

# reinstall galaxy roles
ansible-galaxy install --force -r requirements.yml

# rebuild vagrant vm
vagrant destroy -f && vagrant up
8 Likes

Updating Trellis did the trick. Thanks!

1 Like