Roots Discourse

Error while evaluating conditional (not (not ansible_ssh_extra_args)): 'ansible_ssh_extra_args' is undefined

I’m getting an error when trying to provision a remote server:
System info:
Ansible 2.11.1; Darwin
Trellis version (per changelog): “Improve handling of PHP versions and support PHP 8.0”
---------------------------------------------------
The conditional check ‘not (not ansible_ssh_extra_args)’ failed. The error
was: error while evaluating conditional (not (not ansible_ssh_extra_args)):
‘ansible_ssh_extra_args’ is undefined

The error appears to be in '/Users/james/Sites/square-
mile/trellis/roles/connection/tasks/main.yml': line 9, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: Specify preferred HostKeyAlgorithms for unknown hosts
  ^ here
fatal: [138.68.144.64]: FAILED! => {}

PLAY RECAP **********************************************************************************************************************************
138.68.144.64              : ok=0    changed=0    unreachable=0    failed=1    skipped=1    rescued=0    ignored=0   
localhost                  : ok=0    changed=0    unreachable=0    failed=0    skipped=1    rescued=0    ignored=0   

Provision has always gone fine for me before, any ideas?

This reminds me of a recent PR that has been merged, it could also solve your issue:

Thanks for your help starsis, that didn’t work but I have managed to fix it it seems.

I think it was just an issue with my ansible. I tried to update it last week and it throw some errors, I thought i’d navigated them and updated, but it must not have properly updated. I’m not quite sure what the fix was in the end, but I temporarily renamed some folders in in Library > Python … > ansible and installed again and have now managed to provision a server and deploy to another one.