Vagrant up error at task setup logrotate

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

TASK [logrotate : nickhammond.logrotate | Setup logrotate.d scripts] ***********
System info:
  Ansible; 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
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

Updating Trellis did the trick. Thanks!

1 Like