Bump up Ansible supported versions to 13.x/14.x
The junipernetworks.junos collection was removed from Ansible 14 [1]. We now install it via ansible-galaxy instead. Added check to ``copy_result['invocation']`` as the copy_result shape changed in new Ansible/ansible-core. Replaced docker_image module with community.docker.docker_image_build. [1] https://docs.ansible.com/projects/ansible/latest/collections/junipernetworks/junos/index.html Depends-On: I1da2d8a91af173c7dbe3bb00cc6b791f5a9a620c Change-Id: I77d5727b3692833dbb498a743320a90cbf575217 Co-Authored-By: Rafal Lewandowski <rafal@stackhpc.com> Signed-off-by: Pierre Riteau <pierre@stackhpc.com>
This commit is contained in:
1 parent
39661017d8
commit
4250507f17
8 files changed
+28
-24
No files matched your search
@@ -26,7 +26,7 @@ kolla_ansible_venv_extra_requirements: []
|
||||
# tested code. Changes to this limit should be tested. It is possible to only
|
||||
# install ansible-core by setting kolla_ansible_venv_ansible to None.
|
||||
kolla_ansible_venv_ansible:
|
||||
kolla_ansible_venv_ansible_core: 'ansible-core>=2.19,<2.21'
|
||||
kolla_ansible_venv_ansible_core: 'ansible-core>=2.20,<2.21'
|
||||
|
||||
# Path to a requirements.yml file for Ansible collections.
|
||||
kolla_ansible_requirements_yml: "{{ kolla_ansible_venv }}/share/kolla-ansible/requirements.yml"
|
||||
|
||||
@@ -23,15 +23,12 @@
|
||||
register: docker_images
|
||||
|
||||
- name: Build an Ansible compatible image
|
||||
docker_image:
|
||||
community.docker.docker_image_build:
|
||||
name: "molecule_local/{{ item.item.image }}"
|
||||
source: build
|
||||
build:
|
||||
path: "{{ molecule_ephemeral_directory }}"
|
||||
dockerfile: "{{ item.item.dockerfile | default(item.invocation.module_args.dest) }}"
|
||||
network: host
|
||||
force_source: "{{ item.item.force | default(true) }}"
|
||||
force_tag: "{{ item.item.force | default(true) }}"
|
||||
path: "{{ molecule_ephemeral_directory }}"
|
||||
dockerfile: "{{ item.item.dockerfile | default(item.dest) }}"
|
||||
network: host
|
||||
rebuild: "{{ 'always' if item.item.force | default(true) else 'never' }}"
|
||||
with_items: "{{ platforms.results }}"
|
||||
when: platforms.changed or docker_images.results | map(attribute='images') | select('equalto', []) | list | count >= 0
|
||||
|
||||
|
||||
@@ -24,15 +24,12 @@
|
||||
register: docker_images
|
||||
|
||||
- name: Build an Ansible compatible image
|
||||
docker_image:
|
||||
community.docker.docker_image_build:
|
||||
name: "molecule_local/{{ item.item.image }}"
|
||||
source: build
|
||||
build:
|
||||
path: "{{ molecule_ephemeral_directory }}"
|
||||
dockerfile: "{{ item.item.dockerfile | default(item.invocation.module_args.dest) }}"
|
||||
network: host
|
||||
force_source: "{{ item.item.force | default(true) }}"
|
||||
force_tag: "{{ item.item.force | default(true) }}"
|
||||
path: "{{ molecule_ephemeral_directory }}"
|
||||
dockerfile: "{{ item.item.dockerfile | default(item.dest) }}"
|
||||
network: host
|
||||
rebuild: "{{ 'always' if item.item.force | default(true) else 'never' }}"
|
||||
with_items: "{{ platforms.results }}"
|
||||
when: platforms.changed or docker_images.results | map(attribute='images') | select('equalto', []) | list | count >= 0
|
||||
|
||||
|
||||
@@ -221,9 +221,10 @@ class ActionModule(action.ActionBase):
|
||||
templar=self._templar,
|
||||
shared_loader_obj=self._shared_loader_obj)
|
||||
copy_result = copy_action.run(task_vars=task_vars)
|
||||
copy_result['invocation']['module_args'].update({
|
||||
'src': result_file, 'sources': sources,
|
||||
'whitespace': whitespace})
|
||||
if 'invocation' in copy_result:
|
||||
copy_result['invocation']['module_args'].update({
|
||||
'src': result_file, 'sources': sources,
|
||||
'whitespace': whitespace})
|
||||
result.update(copy_result)
|
||||
finally:
|
||||
shutil.rmtree(local_tempdir)
|
||||
|
||||
@@ -165,9 +165,10 @@ class ActionModule(action.ActionBase):
|
||||
templar=self._templar,
|
||||
shared_loader_obj=self._shared_loader_obj)
|
||||
copy_result = copy_action.run(task_vars=task_vars)
|
||||
copy_result['invocation']['module_args'].update({
|
||||
'src': result_file, 'sources': sources,
|
||||
'extend_lists': extend_lists})
|
||||
if 'invocation' in copy_result:
|
||||
copy_result['invocation']['module_args'].update({
|
||||
'src': result_file, 'sources': sources,
|
||||
'extend_lists': extend_lists})
|
||||
result.update(copy_result)
|
||||
finally:
|
||||
shutil.rmtree(local_tempdir)
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
Updates the maximum supported version of Ansible from 13 (ansible-core
|
||||
2.20) to 14 (ansible-core 2.21). The minimum supported version is updated
|
||||
from 12.x to 13.x. This is true for both Kayobe and Kolla Ansible.
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
pbr>=2.0 # Apache-2.0
|
||||
Jinja2>3 # BSD
|
||||
ansible>=12,<14 # GPLv3
|
||||
ansible>=13,<15 # GPLv3
|
||||
cliff>=3.1.0 # Apache
|
||||
netaddr!=0.7.16,>=0.7.13 # BSD
|
||||
PyYAML>=3.10.0 # MIT
|
||||
|
||||
@@ -13,6 +13,8 @@ collections:
|
||||
version: 1.0.4
|
||||
- name: dellemc.os10
|
||||
version: 1.2.7
|
||||
- name: junipernetworks.junos
|
||||
version: 11.1.1
|
||||
- name: nvidia.nvue
|
||||
version: 1.2.9
|
||||
- name: openstack.cloud
|
||||
|
||||
Reference in new issue
Block a user