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.
Broken out into separate commits, each with a commit message explaining. One commit prevents Ansible's new
dense.py
callback from causing Trellis ssh connection tests to always showroot
as failing to connect. The other commits just prevent Ansible's new warning message about jinja delimiters.The commit
Avoid single var containing jinja delimiters in when parameter
deserves some explanation but don't expect this explanation to stand on its own without examining the commit's diff.Consider a
when
parameter with a single var, e.g.,when: site_uses_letsencrypt
. The var will be expanded and the var's jinja delimiters will trigger related warnings. This PR's commit avoids the warnings by removing jinja delimiters from the var value/definition:That change prevents the warnings, but makes the
site_uses_letsencrypt
var not function in contexts that aren't part of thewhen
task parameter. This accounts for why the commit in question removessite_uses_letsencrypt
from the definition ofmissing_hosts
This change to
missing_hosts
means its two appearances in the formwhen: missing_hosts | count
must be adjusted. However, it turns out that the lack of jinja delimiters insite_uses_letsencrypt
causes this adjustment to be ineffective:This accounts for why the commit in question uses the strategy below, leaving the
site_uses_letsencrypt
alone in a single item (vs. the compound item in the diff above).Tested on Ansible branch 2.3-stable as of
07ea6a6
and on Ansible 2.2.0.0. Tests included default configs and alternative configs such as Let's Encrypt enabled, nginx-includes, androot
login disabled, on DigitalOcean and AWS EC2.