Add Ansible 6
Change-Id: I0d450d9385b9aaab22d2d87fb47798bf56525f50
This commit is contained in:
parent
ad03402dec
commit
7949efd255
@ -54,6 +54,12 @@
|
||||
vars:
|
||||
zuul_ansible_version: 5
|
||||
|
||||
- job:
|
||||
name: zuul-stream-functional-6
|
||||
parent: zuul-stream-functional
|
||||
vars:
|
||||
zuul_ansible_version: 6
|
||||
|
||||
- job:
|
||||
name: zuul-tox
|
||||
description: |
|
||||
@ -320,6 +326,7 @@
|
||||
- zuul-stream-functional-2.8
|
||||
- zuul-stream-functional-2.9
|
||||
- zuul-stream-functional-5
|
||||
- zuul-stream-functional-6
|
||||
- zuul-tox-remote
|
||||
- zuul-quick-start:
|
||||
requires: nodepool-container-image
|
||||
@ -350,6 +357,7 @@
|
||||
- zuul-stream-functional-2.8
|
||||
- zuul-stream-functional-2.9
|
||||
- zuul-stream-functional-5
|
||||
- zuul-stream-functional-6
|
||||
- zuul-tox-remote
|
||||
- zuul-quick-start:
|
||||
requires: nodepool-container-image
|
||||
|
6
releasenotes/notes/ansible-6-f939b4d160b41ec3.yaml
Normal file
6
releasenotes/notes/ansible-6-f939b4d160b41ec3.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Ansible version 6 is now available. The default Ansible version
|
||||
is still 5, but version 6 may be selected by using
|
||||
:attr:`job.ansible-version`.
|
7
tests/fixtures/config/ansible-callbacks/main6.yaml
vendored
Normal file
7
tests/fixtures/config/ansible-callbacks/main6.yaml
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
- tenant:
|
||||
name: tenant-one
|
||||
default-ansible-version: '6'
|
||||
source:
|
||||
gerrit:
|
||||
config-projects:
|
||||
- common-config
|
@ -60,6 +60,14 @@
|
||||
test_ansible_version_major: 2
|
||||
test_ansible_version_minor: 12
|
||||
|
||||
- job:
|
||||
name: ansible-6
|
||||
parent: ansible-version
|
||||
ansible-version: 6
|
||||
vars:
|
||||
test_ansible_version_major: 2
|
||||
test_ansible_version_minor: 13
|
||||
|
||||
- project:
|
||||
name: common-config
|
||||
check:
|
||||
@ -68,6 +76,7 @@
|
||||
- ansible-28
|
||||
- ansible-29
|
||||
- ansible-5
|
||||
- ansible-6
|
||||
|
||||
- project:
|
||||
name: org/project
|
||||
@ -77,3 +86,4 @@
|
||||
- ansible-28
|
||||
- ansible-29
|
||||
- ansible-5
|
||||
- ansible-6
|
||||
|
11
tests/fixtures/config/ansible/main6.yaml
vendored
Normal file
11
tests/fixtures/config/ansible/main6.yaml
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
- tenant:
|
||||
name: tenant-one
|
||||
default-ansible-version: '6'
|
||||
source:
|
||||
gerrit:
|
||||
config-projects:
|
||||
- common-config
|
||||
untrusted-projects:
|
||||
- org/project
|
||||
- bare-role
|
||||
- org/ansible
|
9
tests/fixtures/config/executor-facts/main6.yaml
vendored
Normal file
9
tests/fixtures/config/executor-facts/main6.yaml
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
- tenant:
|
||||
name: tenant-one
|
||||
default-ansible-version: '6'
|
||||
source:
|
||||
gerrit:
|
||||
config-projects:
|
||||
- common-config
|
||||
untrusted-projects:
|
||||
- org/project
|
@ -140,3 +140,12 @@
|
||||
label: ubuntu-xenial
|
||||
ansible-version: '5'
|
||||
run: playbooks/ansible-version.yaml
|
||||
|
||||
- job:
|
||||
name: ansible-version6-inventory
|
||||
nodeset:
|
||||
nodes:
|
||||
- name: ubuntu-xenial
|
||||
label: ubuntu-xenial
|
||||
ansible-version: '6'
|
||||
run: playbooks/ansible-version.yaml
|
||||
|
@ -10,3 +10,4 @@
|
||||
- ansible-version28-inventory
|
||||
- ansible-version29-inventory
|
||||
- ansible-version5-inventory
|
||||
- ansible-version6-inventory
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
|
||||
def main():
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
|
||||
def main():
|
||||
|
@ -109,3 +109,11 @@ class TestActionModules5(AnsibleZuulTestCase, FunctionalActionModulesMixIn):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self._setUp()
|
||||
|
||||
|
||||
class TestActionModules6(AnsibleZuulTestCase, FunctionalActionModulesMixIn):
|
||||
ansible_version = '6'
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self._setUp()
|
||||
|
@ -166,3 +166,11 @@ class TestZuulJSON5(AnsibleZuulTestCase, FunctionalZuulJSONMixIn):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self._setUp()
|
||||
|
||||
|
||||
class TestZuulJSON6(AnsibleZuulTestCase, FunctionalZuulJSONMixIn):
|
||||
ansible_version = '6'
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self._setUp()
|
||||
|
@ -238,3 +238,12 @@ class TestZuulStream5(AnsibleZuulTestCase, FunctionalZuulStreamMixIn):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self._setUp()
|
||||
|
||||
|
||||
class TestZuulStream6(AnsibleZuulTestCase, FunctionalZuulStreamMixIn):
|
||||
ansible_version = '6'
|
||||
ansible_core_version = '2.13'
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self._setUp()
|
||||
|
@ -885,6 +885,11 @@ class TestExecutorFacts5(AnsibleZuulTestCase, ExecutorFactsMixin):
|
||||
ansible_major_minor = '2.12'
|
||||
|
||||
|
||||
class TestExecutorFacts6(AnsibleZuulTestCase, ExecutorFactsMixin):
|
||||
tenant_config_file = 'config/executor-facts/main6.yaml'
|
||||
ansible_major_minor = '2.13'
|
||||
|
||||
|
||||
class AnsibleCallbackConfigsMixin:
|
||||
config_file = 'zuul-executor-ansible-callback.conf'
|
||||
|
||||
@ -957,6 +962,13 @@ class TestAnsibleCallbackConfigs5(AnsibleZuulTestCase,
|
||||
ansible_major_minor = '2.12'
|
||||
|
||||
|
||||
class TestAnsibleCallbackConfigs6(AnsibleZuulTestCase,
|
||||
AnsibleCallbackConfigsMixin):
|
||||
config_file = 'zuul-executor-ansible-callback.conf'
|
||||
tenant_config_file = 'config/ansible-callbacks/main6.yaml'
|
||||
ansible_major_minor = '2.13'
|
||||
|
||||
|
||||
class TestExecutorEnvironment(AnsibleZuulTestCase):
|
||||
tenant_config_file = 'config/zuul-environment-filter/main.yaml'
|
||||
|
||||
|
@ -249,6 +249,30 @@ class TestInventoryAutoPython(TestInventoryBase):
|
||||
self.executor_server.release()
|
||||
self.waitUntilSettled()
|
||||
|
||||
def test_auto_python_ansible6_inventory(self):
|
||||
inventory = self._get_build_inventory('ansible-version6-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['job'], 'ansible-version6-inventory')
|
||||
self.assertEqual(z_vars['message'], 'QQ==')
|
||||
|
||||
self.executor_server.release()
|
||||
self.waitUntilSettled()
|
||||
|
||||
|
||||
class TestInventory(TestInventoryBase):
|
||||
|
||||
|
@ -3858,6 +3858,11 @@ class TestAnsible5(AnsibleZuulTestCase, FunctionalAnsibleMixIn):
|
||||
ansible_major_minor = '2.12'
|
||||
|
||||
|
||||
class TestAnsible6(AnsibleZuulTestCase, FunctionalAnsibleMixIn):
|
||||
tenant_config_file = 'config/ansible/main6.yaml'
|
||||
ansible_major_minor = '2.13'
|
||||
|
||||
|
||||
class TestPrePlaybooks(AnsibleZuulTestCase):
|
||||
# A temporary class to hold new tests while others are disabled
|
||||
|
||||
@ -7951,6 +7956,7 @@ class TestAnsibleVersion(AnsibleZuulTestCase):
|
||||
dict(name='ansible-28', result='SUCCESS', changes='1,1'),
|
||||
dict(name='ansible-29', 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)
|
||||
|
||||
|
||||
@ -7972,6 +7978,7 @@ class TestDefaultAnsibleVersion(AnsibleZuulTestCase):
|
||||
dict(name='ansible-28', result='SUCCESS', changes='1,1'),
|
||||
dict(name='ansible-29', 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)
|
||||
|
||||
|
||||
|
1
zuul/ansible/6/action/__init__.py
Symbolic link
1
zuul/ansible/6/action/__init__.py
Symbolic link
@ -0,0 +1 @@
|
||||
../../base/action/__init__.py
|
1
zuul/ansible/6/action/command.py
Symbolic link
1
zuul/ansible/6/action/command.py
Symbolic link
@ -0,0 +1 @@
|
||||
../../base/action/command.py
|
1
zuul/ansible/6/action/command.pyi
Symbolic link
1
zuul/ansible/6/action/command.pyi
Symbolic link
@ -0,0 +1 @@
|
||||
../../base/action/command.pyi
|
1
zuul/ansible/6/action/zuul_return.py
Symbolic link
1
zuul/ansible/6/action/zuul_return.py
Symbolic link
@ -0,0 +1 @@
|
||||
../../base/action/zuul_return.py
|
1
zuul/ansible/6/callback/__init__.py
Symbolic link
1
zuul/ansible/6/callback/__init__.py
Symbolic link
@ -0,0 +1 @@
|
||||
../../base/callback/__init__.py
|
1
zuul/ansible/6/callback/zuul_json.py
Symbolic link
1
zuul/ansible/6/callback/zuul_json.py
Symbolic link
@ -0,0 +1 @@
|
||||
../../base/callback/zuul_json.py
|
1
zuul/ansible/6/callback/zuul_stream.py
Symbolic link
1
zuul/ansible/6/callback/zuul_stream.py
Symbolic link
@ -0,0 +1 @@
|
||||
../../base/callback/zuul_stream.py
|
1
zuul/ansible/6/callback/zuul_unreachable.py
Symbolic link
1
zuul/ansible/6/callback/zuul_unreachable.py
Symbolic link
@ -0,0 +1 @@
|
||||
../../base/callback/zuul_unreachable.py
|
1
zuul/ansible/6/filter/__init__.py
Symbolic link
1
zuul/ansible/6/filter/__init__.py
Symbolic link
@ -0,0 +1 @@
|
||||
../../base/filter/__init__.py
|
1
zuul/ansible/6/filter/zuul_filters.py
Symbolic link
1
zuul/ansible/6/filter/zuul_filters.py
Symbolic link
@ -0,0 +1 @@
|
||||
../../base/filter/zuul_filters.py
|
1
zuul/ansible/6/library/__init__.py
Symbolic link
1
zuul/ansible/6/library/__init__.py
Symbolic link
@ -0,0 +1 @@
|
||||
../../base/library/__init__.py
|
1
zuul/ansible/6/library/command.py
Symbolic link
1
zuul/ansible/6/library/command.py
Symbolic link
@ -0,0 +1 @@
|
||||
../../base/library/command.py
|
1
zuul/ansible/6/library/zuul_console.py
Symbolic link
1
zuul/ansible/6/library/zuul_console.py
Symbolic link
@ -0,0 +1 @@
|
||||
../../base/library/zuul_console.py
|
1
zuul/ansible/6/logconfig.py
Symbolic link
1
zuul/ansible/6/logconfig.py
Symbolic link
@ -0,0 +1 @@
|
||||
../logconfig.py
|
1
zuul/ansible/6/paths.py
Symbolic link
1
zuul/ansible/6/paths.py
Symbolic link
@ -0,0 +1 @@
|
||||
../paths.py
|
@ -18,3 +18,6 @@ deprecated = true
|
||||
|
||||
[5]
|
||||
requirements = ansible>=5.0,<6.0
|
||||
|
||||
[6]
|
||||
requirements = ansible>=6.0,<7.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user