Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: MariaDB Serversetup skipped if we want to create multiple sites with remote db and local db #1456

Closed
5 tasks done
TimmePfeife opened this issue Dec 14, 2022 · 0 comments · Fixed by #1457
Closed
5 tasks done
Labels

Comments

@TimmePfeife
Copy link
Contributor

Terms

Description

What's wrong?

If we have multiple WordPress sites and one should use a local MariaDB and the other one a remote DB the setup tasks are skipped because of the when condition.

What have you tried?

Changed the condition manually.

Possible solutions

Change the condition in roles/mariadb/tasks/main.yml:75 to:
when: (wordpress_sites.items() | count) > (sites_using_remote_db | count)

Temporary workarounds

Change the condition manually.

Use Case

Use one shared host for multiple WordPress sites, but allow single sites to use a remote database without blocking the initiation of the others.

Steps To Reproduce

  1. add two WordPress sites
  2. add a remote database connection to the second instance via
env:
  db_host: 104.xxx.xxx.xxx
  db_user: example_staging
  db_name: example_staging
  db_prefix: ex_

Expected Behavior

Besides setting up the remote database connection on one site, it should also be set up a local database.

Actual Behavior

It configures the remote database but doesn't set up the local database.

Relevant Log Output

No response

Versions

1.18.0

TimmePfeife pushed a commit to TimmePfeife/trellis that referenced this issue Dec 14, 2022
TimmePfeife pushed a commit to TimmePfeife/trellis that referenced this issue Dec 14, 2022
swalkinshaw pushed a commit that referenced this issue Dec 15, 2022
Co-authored-by: Tim Pfeifer <tim.pfeifer@mailbox.org>
paulbrzeski pushed a commit to paulbrzeski/trellis that referenced this issue Mar 3, 2023
Co-authored-by: Tim Pfeifer <tim.pfeifer@mailbox.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant