diff options
author | Zuul <zuul@review.opendev.org> | 2022-10-24 18:24:59 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2022-10-24 18:24:59 +0000 |
commit | 9d7fbc42343655af86b95008f919c3be5ed8cd96 (patch) | |
tree | 8da8274f5c8f66576bfe62a14c26be627d326013 | |
parent | 776b74ba20130e412d7a01452cdf4f772e2c0ea3 (diff) | |
parent | f9eb49987030a0f163deac08eaba44daddecd081 (diff) | |
download | zuul-9d7fbc42343655af86b95008f919c3be5ed8cd96.tar.gz |
Merge "Remove Ansible 5"
33 files changed, 13 insertions, 168 deletions
diff --git a/.zuul.yaml b/.zuul.yaml index 06c167e9b..1a411c6d3 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -34,12 +34,6 @@ - playbooks/zuul-stream/.* - job: - name: zuul-stream-functional-5 - parent: zuul-stream-functional - vars: - zuul_ansible_version: 5 - -- job: name: zuul-stream-functional-6 parent: zuul-stream-functional vars: @@ -308,7 +302,6 @@ files: - web/.* nodeset: ubuntu-jammy - - zuul-stream-functional-5 - zuul-stream-functional-6 - zuul-tox-remote - zuul-quick-start: @@ -337,7 +330,6 @@ files: - web/.* nodeset: ubuntu-jammy - - zuul-stream-functional-5 - zuul-stream-functional-6 - zuul-tox-remote - zuul-quick-start: diff --git a/doc/source/examples/docker-compose.yaml b/doc/source/examples/docker-compose.yaml index af5c970de..43c0bec61 100644 --- a/doc/source/examples/docker-compose.yaml +++ b/doc/source/examples/docker-compose.yaml @@ -26,7 +26,7 @@ services: - "../../../tools/:/var/zuul-tools/:z" # 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/5/bin/ansible-playbook /var/playbooks/setup.yaml" + command: "/usr/local/lib/zuul/ansible/6/bin/ansible-playbook /var/playbooks/setup.yaml" networks: - zuul zk: diff --git a/releasenotes/notes/ansible-5-removed-956d88b320956dc8.yaml b/releasenotes/notes/ansible-5-removed-956d88b320956dc8.yaml new file mode 100644 index 000000000..6ed4dfd7d --- /dev/null +++ b/releasenotes/notes/ansible-5-removed-956d88b320956dc8.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + Support for Ansible version 5 has been removed. Migrate any + existing jobs which rely on this version to Ansible version 6 + before upgrading. diff --git a/tests/fixtures/config/ansible-callbacks/main5.yaml b/tests/fixtures/config/ansible-callbacks/main5.yaml deleted file mode 100644 index 5efc12339..000000000 --- a/tests/fixtures/config/ansible-callbacks/main5.yaml +++ /dev/null @@ -1,7 +0,0 @@ -- tenant: - name: tenant-one - default-ansible-version: '5' - source: - gerrit: - config-projects: - - common-config 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 14477e20d..37fd74a1f 100644 --- a/tests/fixtures/config/ansible-versions/git/common-config/zuul.yaml +++ b/tests/fixtures/config/ansible-versions/git/common-config/zuul.yaml @@ -29,20 +29,14 @@ # This job is used by a test case specifying a different ansible version in # fixtures/zuul-default-ansible-version.conf +# TODO: make this something other than the Zuul default once there is +# another version of Ansible available. - job: name: ansible-default-zuul-conf parent: ansible-version vars: test_ansible_version_major: 2 - test_ansible_version_minor: 12 - -- job: - name: ansible-5 - parent: ansible-version - ansible-version: 5 - vars: - test_ansible_version_major: 2 - test_ansible_version_minor: 12 + test_ansible_version_minor: 13 - job: name: ansible-6 @@ -57,7 +51,6 @@ check: jobs: - ansible-default - - ansible-5 - ansible-6 - project: @@ -65,5 +58,4 @@ check: jobs: - ansible-default-zuul-conf - - ansible-5 - ansible-6 diff --git a/tests/fixtures/config/ansible/main5.yaml b/tests/fixtures/config/ansible/main5.yaml deleted file mode 100644 index b2364e80b..000000000 --- a/tests/fixtures/config/ansible/main5.yaml +++ /dev/null @@ -1,11 +0,0 @@ -- tenant: - name: tenant-one - default-ansible-version: '5' - source: - gerrit: - config-projects: - - common-config - untrusted-projects: - - org/project - - bare-role - - org/ansible diff --git a/tests/fixtures/config/executor-facts/main5.yaml b/tests/fixtures/config/executor-facts/main5.yaml deleted file mode 100644 index 55d9d10c0..000000000 --- a/tests/fixtures/config/executor-facts/main5.yaml +++ /dev/null @@ -1,9 +0,0 @@ -- tenant: - name: tenant-one - default-ansible-version: '5' - source: - gerrit: - config-projects: - - common-config - untrusted-projects: - - org/project diff --git a/tests/fixtures/config/inventory/git/common-config/zuul.yaml b/tests/fixtures/config/inventory/git/common-config/zuul.yaml index 97ee54fb9..d884193e8 100644 --- a/tests/fixtures/config/inventory/git/common-config/zuul.yaml +++ b/tests/fixtures/config/inventory/git/common-config/zuul.yaml @@ -115,15 +115,6 @@ run: playbooks/network.yaml - job: - name: ansible-version5-inventory - nodeset: - nodes: - - name: ubuntu-xenial - label: ubuntu-xenial - ansible-version: '5' - run: playbooks/ansible-version.yaml - -- job: name: ansible-version6-inventory nodeset: nodes: diff --git a/tests/fixtures/config/inventory/git/org_project/.zuul.yaml b/tests/fixtures/config/inventory/git/org_project/.zuul.yaml index 78f65ea83..21d786682 100644 --- a/tests/fixtures/config/inventory/git/org_project/.zuul.yaml +++ b/tests/fixtures/config/inventory/git/org_project/.zuul.yaml @@ -7,5 +7,4 @@ - executor-only-inventory - group-inventory - hostvars-inventory - - ansible-version5-inventory - ansible-version6-inventory diff --git a/tests/fixtures/config/tenant-parser/ansible-version.yaml b/tests/fixtures/config/tenant-parser/ansible-version.yaml deleted file mode 100644 index 22a6dcf10..000000000 --- a/tests/fixtures/config/tenant-parser/ansible-version.yaml +++ /dev/null @@ -1,20 +0,0 @@ -- tenant: - name: tenant-no-default - source: - gerrit: - config-projects: - - common-config - untrusted-projects: - - org/project1 - - org/project2 - -- tenant: - name: tenant-default-2-5 - default-ansible-version: "2.5" - source: - gerrit: - config-projects: - - common-config - untrusted-projects: - - org/project1 - - org/project2 diff --git a/tests/fixtures/zuul-default-ansible-version.conf b/tests/fixtures/zuul-default-ansible-version.conf index 676516a73..000f27723 100644 --- a/tests/fixtures/zuul-default-ansible-version.conf +++ b/tests/fixtures/zuul-default-ansible-version.conf @@ -7,7 +7,7 @@ server=127.0.0.1 tenant_config=main.yaml relative_priority=true # Used by ansible-default-zuul-conf job -default_ansible_version=5 +default_ansible_version=6 [merger] git_dir=/tmp/zuul-test/merger-git diff --git a/tests/remote/test_remote_action_modules.py b/tests/remote/test_remote_action_modules.py index 923b877c2..2fd02f7d5 100644 --- a/tests/remote/test_remote_action_modules.py +++ b/tests/remote/test_remote_action_modules.py @@ -21,7 +21,7 @@ from tests.base import AnsibleZuulTestCase class FunctionalActionModulesMixIn: tenant_config_file = 'config/remote-action-modules/main.yaml' # This should be overriden in child classes. - ansible_version = '5' + ansible_version = '6' wait_timeout = 120 def _setUp(self): @@ -87,14 +87,6 @@ class FunctionalActionModulesMixIn: self._run_job('shell-good', 'SUCCESS') -class TestActionModules5(AnsibleZuulTestCase, FunctionalActionModulesMixIn): - ansible_version = '5' - - def setUp(self): - super().setUp() - self._setUp() - - class TestActionModules6(AnsibleZuulTestCase, FunctionalActionModulesMixIn): ansible_version = '6' diff --git a/tests/remote/test_remote_zuul_json.py b/tests/remote/test_remote_zuul_json.py index 4451c3630..961288754 100644 --- a/tests/remote/test_remote_zuul_json.py +++ b/tests/remote/test_remote_zuul_json.py @@ -144,14 +144,6 @@ class FunctionalZuulJSONMixIn: dateutil.parser.parse(play_end_time) -class TestZuulJSON5(AnsibleZuulTestCase, FunctionalZuulJSONMixIn): - ansible_version = '5' - - def setUp(self): - super().setUp() - self._setUp() - - class TestZuulJSON6(AnsibleZuulTestCase, FunctionalZuulJSONMixIn): ansible_version = '6' diff --git a/tests/remote/test_remote_zuul_stream.py b/tests/remote/test_remote_zuul_stream.py index 7a7fef08d..e5cce4b51 100644 --- a/tests/remote/test_remote_zuul_stream.py +++ b/tests/remote/test_remote_zuul_stream.py @@ -25,7 +25,7 @@ from tests.base import AnsibleZuulTestCase class FunctionalZuulStreamMixIn: tenant_config_file = 'config/remote-zuul-stream/main.yaml' # This should be overriden in child classes. - ansible_version = '5' + ansible_version = '6' def _setUp(self): self.log_console_port = 19000 + int( @@ -253,15 +253,6 @@ class FunctionalZuulStreamMixIn: self.assertLogLine(regex, text) -class TestZuulStream5(AnsibleZuulTestCase, FunctionalZuulStreamMixIn): - ansible_version = '5' - ansible_core_version = '2.12' - - def setUp(self): - super().setUp() - self._setUp() - - class TestZuulStream6(AnsibleZuulTestCase, FunctionalZuulStreamMixIn): ansible_version = '6' ansible_core_version = '2.13' diff --git a/tests/unit/test_executor.py b/tests/unit/test_executor.py index 31e3b74c5..ab31aa1ec 100644 --- a/tests/unit/test_executor.py +++ b/tests/unit/test_executor.py @@ -870,11 +870,6 @@ class ExecutorFactsMixin: output) -class TestExecutorFacts5(AnsibleZuulTestCase, ExecutorFactsMixin): - tenant_config_file = 'config/executor-facts/main5.yaml' - ansible_major_minor = '2.12' - - class TestExecutorFacts6(AnsibleZuulTestCase, ExecutorFactsMixin): tenant_config_file = 'config/executor-facts/main6.yaml' ansible_major_minor = '2.13' @@ -931,13 +926,6 @@ class AnsibleCallbackConfigsMixin: output) -class TestAnsibleCallbackConfigs5(AnsibleZuulTestCase, - AnsibleCallbackConfigsMixin): - config_file = 'zuul-executor-ansible-callback.conf' - tenant_config_file = 'config/ansible-callbacks/main5.yaml' - ansible_major_minor = '2.12' - - class TestAnsibleCallbackConfigs6(AnsibleZuulTestCase, AnsibleCallbackConfigsMixin): config_file = 'zuul-executor-ansible-callback.conf' diff --git a/tests/unit/test_inventory.py b/tests/unit/test_inventory.py index acfe1a3ae..5b30a139f 100644 --- a/tests/unit/test_inventory.py +++ b/tests/unit/test_inventory.py @@ -180,31 +180,6 @@ class TestInventoryShellType(TestInventoryBase): class TestInventoryAutoPython(TestInventoryBase): - def test_auto_python_ansible5_inventory(self): - inventory = self._get_build_inventory('ansible-version5-inventory') - - all_nodes = ('ubuntu-xenial',) - self.assertIn('all', inventory) - self.assertIn('hosts', inventory['all']) - self.assertIn('vars', inventory['all']) - for node_name in all_nodes: - self.assertIn(node_name, inventory['all']['hosts']) - node_vars = inventory['all']['hosts'][node_name] - self.assertEqual( - 'auto', node_vars['ansible_python_interpreter']) - - self.assertIn('zuul', inventory['all']['vars']) - z_vars = inventory['all']['vars']['zuul'] - self.assertIn('executor', z_vars) - self.assertIn('src_root', z_vars['executor']) - self.assertIn('job', z_vars) - self.assertEqual(z_vars['ansible_version'], '5') - self.assertEqual(z_vars['job'], 'ansible-version5-inventory') - self.assertEqual(z_vars['message'], 'QQ==') - - self.executor_server.release() - self.waitUntilSettled() - def test_auto_python_ansible6_inventory(self): inventory = self._get_build_inventory('ansible-version6-inventory') diff --git a/tests/unit/test_v3.py b/tests/unit/test_v3.py index 225c6d355..92e216fcf 100644 --- a/tests/unit/test_v3.py +++ b/tests/unit/test_v3.py @@ -3964,11 +3964,6 @@ class FunctionalAnsibleMixIn(object): output) -class TestAnsible5(AnsibleZuulTestCase, FunctionalAnsibleMixIn): - tenant_config_file = 'config/ansible/main5.yaml' - ansible_major_minor = '2.12' - - class TestAnsible6(AnsibleZuulTestCase, FunctionalAnsibleMixIn): tenant_config_file = 'config/ansible/main6.yaml' ansible_major_minor = '2.13' @@ -8064,7 +8059,6 @@ class TestAnsibleVersion(AnsibleZuulTestCase): self.assertHistory([ dict(name='ansible-default', result='SUCCESS', changes='1,1'), - dict(name='ansible-5', result='SUCCESS', changes='1,1'), dict(name='ansible-6', result='SUCCESS', changes='1,1'), ], ordered=False) @@ -8084,7 +8078,6 @@ class TestDefaultAnsibleVersion(AnsibleZuulTestCase): self.assertHistory([ dict(name='ansible-default-zuul-conf', result='SUCCESS', changes='1,1'), - dict(name='ansible-5', result='SUCCESS', changes='1,1'), dict(name='ansible-6', result='SUCCESS', changes='1,1'), ], ordered=False) diff --git a/zuul/ansible/5/action/__init__.py b/zuul/ansible/5/action/__init__.py deleted file mode 120000 index 4048e7ac1..000000000 --- a/zuul/ansible/5/action/__init__.py +++ /dev/null @@ -1 +0,0 @@ -../../base/action/__init__.py
\ No newline at end of file diff --git a/zuul/ansible/5/action/command.py b/zuul/ansible/5/action/command.py deleted file mode 120000 index 56c6b636f..000000000 --- a/zuul/ansible/5/action/command.py +++ /dev/null @@ -1 +0,0 @@ -../../base/action/command.py
\ No newline at end of file diff --git a/zuul/ansible/5/action/command.pyi b/zuul/ansible/5/action/command.pyi deleted file mode 120000 index a003281ca..000000000 --- a/zuul/ansible/5/action/command.pyi +++ /dev/null @@ -1 +0,0 @@ -../../base/action/command.pyi
\ No newline at end of file diff --git a/zuul/ansible/5/action/zuul_return.py b/zuul/ansible/5/action/zuul_return.py deleted file mode 120000 index 83c2fc619..000000000 --- a/zuul/ansible/5/action/zuul_return.py +++ /dev/null @@ -1 +0,0 @@ -../../base/action/zuul_return.py
\ No newline at end of file diff --git a/zuul/ansible/5/callback/__init__.py b/zuul/ansible/5/callback/__init__.py deleted file mode 120000 index 00b974388..000000000 --- a/zuul/ansible/5/callback/__init__.py +++ /dev/null @@ -1 +0,0 @@ -../../base/callback/__init__.py
\ No newline at end of file diff --git a/zuul/ansible/5/callback/zuul_json.py b/zuul/ansible/5/callback/zuul_json.py deleted file mode 120000 index b0a07779b..000000000 --- a/zuul/ansible/5/callback/zuul_json.py +++ /dev/null @@ -1 +0,0 @@ -../../base/callback/zuul_json.py
\ No newline at end of file diff --git a/zuul/ansible/5/callback/zuul_stream.py b/zuul/ansible/5/callback/zuul_stream.py deleted file mode 120000 index f75561bf4..000000000 --- a/zuul/ansible/5/callback/zuul_stream.py +++ /dev/null @@ -1 +0,0 @@ -../../base/callback/zuul_stream.py
\ No newline at end of file diff --git a/zuul/ansible/5/callback/zuul_unreachable.py b/zuul/ansible/5/callback/zuul_unreachable.py deleted file mode 120000 index 205baca6f..000000000 --- a/zuul/ansible/5/callback/zuul_unreachable.py +++ /dev/null @@ -1 +0,0 @@ -../../base/callback/zuul_unreachable.py
\ No newline at end of file diff --git a/zuul/ansible/5/filter/__init__.py b/zuul/ansible/5/filter/__init__.py deleted file mode 120000 index f80a4da61..000000000 --- a/zuul/ansible/5/filter/__init__.py +++ /dev/null @@ -1 +0,0 @@ -../../base/filter/__init__.py
\ No newline at end of file diff --git a/zuul/ansible/5/filter/zuul_filters.py b/zuul/ansible/5/filter/zuul_filters.py deleted file mode 120000 index d406e5fe6..000000000 --- a/zuul/ansible/5/filter/zuul_filters.py +++ /dev/null @@ -1 +0,0 @@ -../../base/filter/zuul_filters.py
\ No newline at end of file diff --git a/zuul/ansible/5/library/__init__.py b/zuul/ansible/5/library/__init__.py deleted file mode 120000 index 0b68ce0f4..000000000 --- a/zuul/ansible/5/library/__init__.py +++ /dev/null @@ -1 +0,0 @@ -../../base/library/__init__.py
\ No newline at end of file diff --git a/zuul/ansible/5/library/command.py b/zuul/ansible/5/library/command.py deleted file mode 120000 index 9c7633169..000000000 --- a/zuul/ansible/5/library/command.py +++ /dev/null @@ -1 +0,0 @@ -../../base/library/command.py
\ No newline at end of file diff --git a/zuul/ansible/5/library/zuul_console.py b/zuul/ansible/5/library/zuul_console.py deleted file mode 120000 index 7c905e0f9..000000000 --- a/zuul/ansible/5/library/zuul_console.py +++ /dev/null @@ -1 +0,0 @@ -../../base/library/zuul_console.py
\ No newline at end of file diff --git a/zuul/ansible/5/logconfig.py b/zuul/ansible/5/logconfig.py deleted file mode 120000 index 767cb2e81..000000000 --- a/zuul/ansible/5/logconfig.py +++ /dev/null @@ -1 +0,0 @@ -../logconfig.py
\ No newline at end of file diff --git a/zuul/ansible/5/paths.py b/zuul/ansible/5/paths.py deleted file mode 120000 index dbdb1858e..000000000 --- a/zuul/ansible/5/paths.py +++ /dev/null @@ -1 +0,0 @@ -../paths.py
\ No newline at end of file diff --git a/zuul/lib/ansible-config.conf b/zuul/lib/ansible-config.conf index c2c42a299..032d9b8bf 100644 --- a/zuul/lib/ansible-config.conf +++ b/zuul/lib/ansible-config.conf @@ -4,9 +4,5 @@ default_version = 6 # OpenStackSDK 0.99.0 coincides with CORS header problems in some providers requirements = openstacksdk<0.99 openshift jmespath google-cloud-storage pywinrm boto3 azure-storage-blob ibm-cos-sdk netaddr passlib -[5] -requirements = ansible>=5.0,<6.0 -deprecated = true - [6] requirements = ansible>=6.0,<7.0 |