Closed strarsis closed 3 years ago
I'm tempted to just say "wont fix" because the manual solution isn't that difficult? Plus I imagine this is fairly rare. But I was curious how I'd solve this with Ansible and I learned about block rescues.
Does https://github.com/roots/trellis/pull/1296 make sense as a solution?
Alternatively, we can force
the two get_url
tasks.
See: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/get_url_module.html#parameter-force
I like this approach.
Description
When a wp cli phar file was downloaded (to
/tmp
) that doesn't match the signature file, e.g. a failed/corrupted download or using a development phar, the ansible task for installing wp-cli fails at the signature verification step. It can only be manually fixed by renaming/removing the non-matching wp-cli phar file.Steps to reproduce
1.. Simulate an incorrect wp cli phar in
/tmp
(e.g. download the nightly build phar)./tmp/wp-cli-*.phar
and/or cleaning up the signature file/tmp/wp-cli-*.phar.asc
, the playbook is applied and the specific WP CLI release is installed successfully.Expected behavior:
ansible-playbook
applies correctly, installing the specified WP CLI release.Actual behavior:
ansible-playbook
fails to apply in specific instances where the wp cli phar file is corrupted/changed/nightly.Reproduces how often: When this issue happened, the issue reproduces until the wp cli phar file is renamed/cleaned up.
Versions
Fix #1284 - Update logrotate postrotate Nginx command (#1293)