Closed freephile closed 2 days ago
This is the test that previously generated errors when the upgrade playbook was still in place:
su meza-ansible -c "ansible-playbook /opt/meza/src/playbooks/site.yml --check -i /opt/conf-meza/secret/monolith/hosts --vault-password-file /opt/conf-meza/vault/vault-pass-monolith.txt --extra-vars '{\"env\": \"monolith\"}' -vvv"
At first, I tried to suppress the errors by adding multiple
ignore_errors: "{{ ansible_check_mode }}"
to each task that did not support check mode.
ref. https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_checkmode.html
Issue details
When testing, the elasticsearch upgrade playbook generates errors because the url module is not 'check' compatible. Rather than suppress the error, the whole Elasticsearch upgrade logic and code should be removed because it was to support OLD upgrades. We are already at Elasticsearch 7.x and any subsequent upgrade functionality should be better handled.
For reference in the future (and even before handling new Elasticsearch versions), we could potentially use the official ansible playbook from Elastic Co.
https://github.com/elastic/ansible-elasticsearch