This adds support for Ansible 5. As mentioned in the reno, only the major version is specified; that corresponds to major.minor in Ansible core, so is approximately equivalent to our current regime. The command module is updated to be based on the current code in ansible core 2.12.4 (corresponding to community 5.6.0). The previous version is un-symlinked and copied to the 2.8 and 2.8 directories for easy deletion as they age out. The new command module has corrected a code path we used to test that the zuul_stream module handles python exceptions in modules, so instead we now take advantage of the ability to load playbook-adjacent modules to add a test fixture module that always raises an exception. The zuul stream functional test validation is adjusted to match the new values. Similarly, in test_command in the remote tests, we relied on that behavior, but there is already a test for module exceptions in test_module_exception, so that check is simply removed. Among our Ansible version tests, we occasionally had tests which exercised 2.8 but not 2.9 because it is the default and is otherwise tested. This change adds explicit tests for 2.9 even if they are redundant in order to make future Ansible version updates easier and more mechanical (we don't need to remember to add 2.9 later when we change the default). This is our first version of Ansible where the value of job.ansible-version could be interpreted as an integer, so the configloader is updated to handle that possibility transparently, as it already does for floating point values. Change-Id: I694b979077d7944b4b365dbd8c72aba3f9807329
20 lines
408 B
YAML
20 lines
408 B
YAML
- name: Run some commands to show that logging works on failed tasks too
|
|
hosts: node
|
|
tasks:
|
|
|
|
- block:
|
|
|
|
- name: Run a task with an ansible python exception
|
|
zuul_fail:
|
|
key: fail-task
|
|
|
|
always:
|
|
|
|
- name: Loop with items on an ansible python exception
|
|
zuul_fail:
|
|
key: fail-loop
|
|
with_items:
|
|
- item1
|
|
- item2
|
|
- item3
|