Ansible plugin callback error / warning during Kinsta deploy

After following the guide on deploying to Kinsta with Trellis (Deploying Trellis-based WordPress Sites to Kinsta | Roots), everything seems to be working properly.

There is still one warning/error however in the process, which produces the error below:

PLAY [Ensure necessary variables are defined] *****************************************************************
 [WARNING]: Failure using method (v2_playbook_on_play_start) in callback plugin (<ansible.plugins.callback./siteworkingdir/trellis/lib/trellis/plugins/callback/vars.CallbackModule object at
0x10e79fc10>): 'AnsibleUnicode' object has no attribute 'get_groups'

Callback Exception:
  File "/usr/local/lib/python3.7/site-packages/ansible/executor/", line 333, in send_callback
    method(*new_args, **kwargs)
   File "/siteworkingdir/trellis/lib/trellis/plugins/callback/", line 108, in v2_playbook_on_play_start
    hostvars = play.get_variable_manager().get_vars(play=play, host=host)
   File "/usr/local/lib/python3.7/site-packages/ansible/vars/", line 204, in get_vars
    host_groups = sort_groups([g for g in host.get_groups() if not in ['all']])

All vault files seem to be set up properly, as well as the wordpress_sites.yml files.
Not all variables in the vault files are used however during Kinsta deploy, is that perhaps what’s causing this?

Ansible is at version 2.8.4
Python at 3.7.3

Any thought or ideas what could be causing this warning?

Thank you for your time!

Ansible 2.8+ has issues with certain versions of Trellis, you may want to check out this post: Ansible upgrade breaks access to all other trellis deploys

If that’s not your problem, very often in my own experience these kinds of issues are caused by a small mistake in my YAML, so you may want to double-check that and run it through a validator.