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

Bump Ansible version_tested_max to 2.4.2.0 #932

Merged
merged 1 commit into from
Dec 31, 2017
Merged

Conversation

fullyint
Copy link
Contributor

In my tests, Trellis works with Ansible 2.4.2.0 as expected.

The only exception is that the Trellis output.py callback plugin was not formatting failure output as expected (e.g., not interpreting \n line breaks). The plugin had been triggering such formatting when the failed: True status appeared in the result formerly sent to callbacks.

Such statuses were removed in ansible/ansible#27175, the rationale being that "statuses are already reflected on the event type." For example, the v2_runner_on_failed event obviously implies failed status. The Trellis output plugin was already loading and passing along a task_failed attribute that can serve just as well.

Before fix

TASK [connection : Warn about change in host keys] **************************************************************************
System info:
  Ansible 2.4.2.0; Darwin
  Trellis at "Add MariaDB 10.2 PPA"
---------------------------------------------------
fatal: [example.com]: FAILED! => {"changed": false, "msg": "WARNING: REMOTE HOST IDENTIFICATION HAS
CHANGED!\n\nIf this change in host keys is expected (e.g., if you rebuilt the server\nor if the
Trellis sshd role made changes recently), then run the following\ncommand to clear the old host key
from your known_hosts.\n\n  ssh-keygen -R example.com\n\nThen try your Trellis playbook or SSH 
connection again.\n\nIf the change is unexpected, cautiously consider why the host 
identification\nmay have changed and whether you may be victim to a man-in-the-middle attack.

After fix

TASK [connection : Warn about change in host keys] **************************************************************************
System info:
  Ansible 2.4.2.0; Darwin
  Trellis at "Bump Ansible `version_tested_max` to 2.4.2.0"
---------------------------------------------------
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

If this change in host keys is expected (e.g., if you rebuilt the server
or if the Trellis sshd role made changes recently), then run the following
command to clear the old host key from your known_hosts.

  ssh-keygen -R example.com

Then try your Trellis playbook or SSH connection again.

If the change is unexpected, cautiously consider why the host identification
may have changed and whether you may be victim to a man-in-the-middle attack.

Callback events must interpret task status as `failed: true` based
on the callback event type and not on any such status passed via
the task `result`.
@fullyint fullyint merged commit 7d81e08 into master Dec 31, 2017
@fullyint fullyint deleted the ansible-2.4.2 branch December 31, 2017 19:31
primozcigler added a commit to proteusthemes/pt-ops that referenced this pull request Jan 5, 2018
* trellis/master: (292 commits)
  Bump Ansible version_tested_max to 2.4.2.0 (roots#932)
  Add MariaDB 10.2 PPA
  Remove cron_file if WP system cron disabled (roots#927)
  Add Code of Conduct [ci skip]
  Expose the deploy_helper keep_releases option (roots#922)
  Close roots#580 - Switch from .dev to .test
  Update acme-tiny commit hash
  Enable select deploy configs to optionally vary by site (roots#919)
  1.0.0-rc.2
  Update to WP-CLI 1.4.1.
  Disallow duplicate site keys within a host's wordpress_sites (roots#910)
  Replace bare Dataloader() with pre-loaded play._loader (roots#917)
  Remove outdated to_unicode import from plugin utils (roots#916)
  Fix raw_vars functionality for Ansible 2.4.1 (roots#915)
  Enable ioapic
  Update vagrant_box_version to current release
  Dynamically increase ansible_group_priority for selected env (roots#909)
  Bump Ansible version_tested_max to 2.4.1.0 (roots#911)
  Clarify DB task name.
  Update wp-cli to 1.4.0.
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants