Skip to content

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

@TimmePfeife

Description

@TimmePfeife

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions