Change remote-user role to connection role: tests host key, user #745
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.
This PR adds a task that provides guidance when SSH fails due to changed host keys:
Ansible's typical message doesn't help identify host key change:
First commit. Changes in
remote-user/tasks/main.yml
are simpler than they appear in the diff:block
with a new conditional (but the 3 tasks are unchanged)The first commit also adds the connection test to
deploy.yml
androllback.yml
.Second commit. Just renames the
remote-user
role to a more generic nameconnection
, now that it is dealing with SSH connection generally, vs. just theremote_user
.This only functions with Ansible 2.2+ but doesn't cause problems with 2.0.2.0 or 2.1.1.0