I’m getting an error when running Trellis via AWX:
The field 'environment' has an invalid value, which includes an undefined variable. The error was: 'ssh_args_default' is undefined
The playbook runs properly from the cli. I tried defining ssh_args_default to ‘’, as well as real SSH args. All ways I tested, local CLI deployment still worked and failed in AWX.
I did see this post that covers a similar error message, and verified that the directory is not world-writable.
The full error text (below) also suggests that a string might need quotes, but is incorrect.
Suggestions?
“msg”: “The field ‘environment’ has an invalid value, which includes an undefined variable. The error was: ‘ssh_args_default’ is undefined\n\nThe error appears to be in ‘/tmp/awx_116_0yibk53w/project/trellis/roles/connection/tasks/main.yml’: line 18, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Check whether Ansible can connect as {{ dynamic_user | default(true) | ternary(‘root’, web_user) }}\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - “{{ foo }}”\n”,
this is the output via ansible-playbook:
-o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s
<ansible.playbook.attribute.FieldAttribute object at 0x109717190>
is that a fatal error? I have no background in python.
Testing in AWX, I don’t get any python output. Any idea how to enable that?
Primarily, I needed to set the path in AWX settings to callback plugins. That got the ball rolling for me. That lead to a lightbulb moment about directory structure in AWX and I rebuilt the repo with trellis as the base and site (bedrock) inside.
I also had to rename galaxy.yml to roles/requirements.yml for AWX to find it.
Probably a couple of other things as well. I’ll post more detailed findings and maybe a PR when I’ve gotten this cleaned up a bit more. So glad this part is behind me now. Hoped to get AWX working in an afternoon and it’s been a week.