Allow use with multiple server Trellis #30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Using this role as-is on a Trellis setup with multiple servers is not possible because it fails when no license key is set. This PR will only run install tasks if a license key is set, but allow provisioning to complete if it isn't.
Use case
We're using Trellis with multiple servers, set up under
host_vars
e.g.In a simplified example, we want to use New Relic on server 2 but NOT server 1. By allowing a
false
value to be set (or defaulting to it), the New Relic install tasks can be skipped for servers we don't want to install it on.Feedback welcome and thanks for making this role available in the first place!