diff options
author | Paul Belanger <pabelanger@redhat.com> | 2019-08-15 09:30:56 -0400 |
---|---|---|
committer | Paul Belanger <pabelanger@redhat.com> | 2019-12-10 11:28:34 -0500 |
commit | db0fd4e57d918182e800a8b6d83e08595f94a1c4 (patch) | |
tree | 578beeb3eea5d9b2946f7cafc3517125b1a4894a | |
parent | a0015014c94b4b8a51327cfdbb737eb7fed5b659 (diff) | |
download | zuul-db0fd4e57d918182e800a8b6d83e08595f94a1c4.tar.gz |
Switch ansible_default to 2.8
As this is the lastest stable version of ansible.
Change-Id: I02a0e9703a61b3976cec559a1069b51616c3d447
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
-rw-r--r-- | doc/source/admin/examples/docker-compose.yaml | 4 | ||||
-rw-r--r-- | releasenotes/notes/ansible-2.8-default-version-43754b72b3dd2897.yaml | 8 | ||||
-rw-r--r-- | tests/fixtures/config/ansible-versions/git/common-config/zuul.yaml | 2 | ||||
-rw-r--r-- | tests/unit/test_inventory.py | 2 | ||||
-rw-r--r-- | tests/unit/test_v3.py | 10 | ||||
-rw-r--r-- | zuul/lib/ansible-config.conf | 3 |
6 files changed, 20 insertions, 9 deletions
diff --git a/doc/source/admin/examples/docker-compose.yaml b/doc/source/admin/examples/docker-compose.yaml index 2e042f35c..16ba24cad 100644 --- a/doc/source/admin/examples/docker-compose.yaml +++ b/doc/source/admin/examples/docker-compose.yaml @@ -27,7 +27,9 @@ services: - "sshkey:/var/ssh:z" - "nodessh:/var/node:z" - "./playbooks/:/var/playbooks/:z" - command: "/usr/local/lib/zuul/ansible/2.5/bin/ansible-playbook /var/playbooks/setup.yaml" + # NOTE(pabelanger): Be sure to update this line each time we change the + # default version of ansible for Zuul. + command: "/usr/local/lib/zuul/ansible/2.8/bin/ansible-playbook /var/playbooks/setup.yaml" zk: image: zookeeper mysql: diff --git a/releasenotes/notes/ansible-2.8-default-version-43754b72b3dd2897.yaml b/releasenotes/notes/ansible-2.8-default-version-43754b72b3dd2897.yaml new file mode 100644 index 000000000..b41cea8b7 --- /dev/null +++ b/releasenotes/notes/ansible-2.8-default-version-43754b72b3dd2897.yaml @@ -0,0 +1,8 @@ +--- +upgrade: + - | + The default version of Ansible used by Zuul jobs has been changed to 2.8. + See :attr:`job.ansible-version` for more information. + - | + Ansible 2.6 for Zuul jobs has been marked deprecated and will be removed in + a future release. diff --git a/tests/fixtures/config/ansible-versions/git/common-config/zuul.yaml b/tests/fixtures/config/ansible-versions/git/common-config/zuul.yaml index 72d74f513..49b129a91 100644 --- a/tests/fixtures/config/ansible-versions/git/common-config/zuul.yaml +++ b/tests/fixtures/config/ansible-versions/git/common-config/zuul.yaml @@ -25,7 +25,7 @@ parent: ansible-version vars: test_ansible_version_major: 2 - test_ansible_version_minor: 7 + test_ansible_version_minor: 8 # This job is used by a test case specifying a different ansible version in # zuul.conf diff --git a/tests/unit/test_inventory.py b/tests/unit/test_inventory.py index 3fcb9f1c9..858fb8d8d 100644 --- a/tests/unit/test_inventory.py +++ b/tests/unit/test_inventory.py @@ -141,7 +141,7 @@ class TestInventory(TestInventoryBase): self.assertIn(node_name, inventory['all']['hosts']) node_vars = inventory['all']['hosts'][node_name] self.assertEqual( - '/usr/bin/python2', node_vars['ansible_python_interpreter']) + 'auto', node_vars['ansible_python_interpreter']) self.assertIn('zuul', inventory['all']['vars']) self.assertIn('attempts', inventory['all']['vars']['zuul']) self.assertEqual(1, inventory['all']['vars']['zuul']['attempts']) diff --git a/tests/unit/test_v3.py b/tests/unit/test_v3.py index 8bce1c45e..a6241806f 100644 --- a/tests/unit/test_v3.py +++ b/tests/unit/test_v3.py @@ -4939,15 +4939,15 @@ class TestJobOutput(AnsibleZuulTestCase): j = json.loads(self._get_file(self.history[0], 'work/logs/job-output.json')) self.assertEqual(token, - j[0]['plays'][0]['tasks'][0] + j[0]['plays'][0]['tasks'][1] ['hosts']['test_node']['stdout']) - self.assertTrue(j[0]['plays'][0]['tasks'][1] - ['hosts']['test_node']['skipped']) self.assertTrue(j[0]['plays'][0]['tasks'][2] + ['hosts']['test_node']['skipped']) + self.assertTrue(j[0]['plays'][0]['tasks'][3] ['hosts']['test_node']['failed']) self.assertEqual( "This is a handler", - j[0]['plays'][0]['tasks'][3] + j[0]['plays'][0]['tasks'][4] ['hosts']['test_node']['stdout']) self.log.info(self._get_file(self.history[0], @@ -4997,7 +4997,7 @@ class TestJobOutput(AnsibleZuulTestCase): j = json.loads(self._get_file(self.history[0], 'work/logs/job-output.json')) self.assertEqual(token, - j[0]['plays'][0]['tasks'][0] + j[0]['plays'][0]['tasks'][1] ['hosts']['test_node']['stdout']) self.log.info(self._get_file(self.history[0], diff --git a/zuul/lib/ansible-config.conf b/zuul/lib/ansible-config.conf index ad7e6f903..2b3a8ddd1 100644 --- a/zuul/lib/ansible-config.conf +++ b/zuul/lib/ansible-config.conf @@ -1,6 +1,6 @@ # This file describes the currently supported ansible versions [common] -default_version = 2.7 +default_version = 2.8 requirements = ara>=0.16.5,<1.0.0 openstacksdk openshift jmespath [2.5] @@ -8,6 +8,7 @@ deprecated = true requirements = ansible>=2.5.1,<2.6 [2.6] +deprecated = true requirements = ansible>=2.6,<2.7 [2.7] |