Single Install, Many Sites

Ok, so I’m very unclear on the next step here.

I’ve setup five websites in my bedrock-ansible folder. One with the same name as the project,, in the folder site. The others in their own folders in the same level as site,,, etc. The development setup works just fine.

When I push up to production, the server provisions ok, but the deploy does not. I have two issues here.

One, why do I have to specify a sitename as part of the deploy command if I’m working on everything as one big projects. Two, how can I get this to work. The error I get when I try to deploy any of the others is:

TASK: [deploy | Move project subtree into root folder] ************************
fatal: [] => error while evaluating conditional: site2

Does it have to do with the repo settings? Subtree? Thanks all, feeling frustrated.

Again, the folder structure is

Is there anyone that has a working example of a two site install with bedrock-ansible? Or a version of production’s group_vars that’s commented?

I might be wrong, but if your git root is “”, and the name of the subfolder containing site2 is “”, then the subtree for site2 would have to be the path relative to the git root : “subtree:”.

1 Like

@patrickv is correct about the subtree value.

Although I do think there might be a bug in the Ansible conditional for it. A few people have gotten:

error while evaluating conditional: site2

You can always just try commenting out this line to test:

Ok, great, it works. So, getting hung up on that conditional…

I think I fixed it. The Ansible docs say that ‘when’ as its used here evaluates for a boolean, true, false, but subtree is false or present, so it only passes if you change the line to:

when: project_subtree is defined

Not sure if this works when subtree is left off.

Thanks guys!

1 Like

That should work. Want to submit a PR for the fix?

Done. Wow, my first pull request. :no_mouth: