Adapting Trellis for ansible-tower/awx

I’m working on getting Trellis to deploy via AWX. My trellis deployment works great from the CLI but I get the following output when running from AWX.

Instead of -e env=production, I’m setting extra variables env: production

Identity added: /tmp/awx_64_can9qm6c/artifacts/64/ssh_key_data (user@Lenovo.local)
Using /etc/ansible/ansible.cfg as config file
PLAY [Ensure necessary variables are defined] **********************************
TASK [Ensure environment is defined] *******************************************
skipping: [localhost] => {"changed": false, "skip_reason": "Conditional result was False"}
 [WARNING]: Could not match supplied host pattern, ignoring: web
 [WARNING]: Could not match supplied host pattern, ignoring: production
PLAY [Test Connection and Determine Remote User] *******************************
skipping: no hosts matched
PLAY [Set ansible_python_interpreter] ******************************************
skipping: no hosts matched
PLAY [WordPress Server - Install LEMP Stack with PHP 7.3 and MariaDB MySQL] ****
skipping: no hosts matched
PLAY RECAP *********************************************************************
localhost                  : ok=0    changed=0    unreachable=0    failed=0    skipped=1    rescued=0    ignored=0   

My hosts/production file is properly defined, but I get the “Could not match supplied host pattern”.

This seems like it should just work, as it’s running ansible, but I’d also like to move to using AWX’s hosts inventory as an option, if anyone has any guidance there.

I figured out that I needed to specify the [production] and [web] groups in the AWX inventory.

That’s leading to different & fatal error, but this is a step forward.

1 Like

This topic was automatically closed after 42 days. New replies are no longer allowed.