You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
trellis-cli is primarily designed around environments which are really inventory/host groups in Ansible. This is the standard setup where wordpress_sites.yml is defined in each environment group var folder.
Because of this, the CLI detects environments by a glob group_vars/*/wordpress_sites.yml and parses them to be "site aware". Obviously this means it won't support any other kind of setups. Below is an example where the sites are defined per host (not group) which breaks these assumptions.
@dalepgrant forgot to ask, but with your setup you have no distinction between environments right? If so, you can just use development:
trellis provision --extra-vars ansible_limit=server1 development
The environment shouldn't really matter here... you just need one that exists to satisfy the requirements. Or, just dump a basic wordpress_sites.yml file in group_vars/production if you really need the production env for some reason.
Considering how rare this use case is, and how it's non-standard, it's unlikely trellis-cli will be able to support it properly.
Huurrrm yeah we do have a distinction in that group_vars/[env]/* files are different. It's easier to maintain one production vault than multiple host vaults and keeps the difference from stock Trellis to a minimum, for example. Wouldn't setting the env as development for all servers mess up things like mail? I can confirm, for example, we don't have MailHog set up on anything other than development.
Over the years I've seen a few people asking for Trellis w/ multiple site setups, I'm sure we're not the only ones though most of the discussions about it in discourse go back a few years. I'll concede we're in the minority 😅 but the chap in #208 is also potentially in that minority.
For now (and for anyone else looking) the standard provision/deploy scripts work, they're just verbose e.g.
Provision:
trellis-cli is primarily designed around environments which are really inventory/host groups in Ansible. This is the standard setup where
wordpress_sites.yml
is defined in each environment group var folder.Because of this, the CLI detects environments by a glob
group_vars/*/wordpress_sites.yml
and parses them to be "site aware". Obviously this means it won't support any other kind of setups. Below is an example where the sites are defined per host (not group) which breaks these assumptions.Example of a use case here in Roots Discourse.
We have our Trellis structured as follows:
Our deploy then looks like this with the old deploy.sh script:
Not strictly related to this issue, but if I try to run your suggestion while provisioning, trellis-cli gives an error
Originally posted by @dalepgrant in #208 (comment)
The text was updated successfully, but these errors were encountered: