diff --git a/.yamllint b/.yamllint index 479488dee..97df4879c 100644 --- a/.yamllint +++ b/.yamllint @@ -1,3 +1,4 @@ +--- extends: default rules: diff --git a/ansible/roles/ipa-images/tasks/main.yml b/ansible/roles/ipa-images/tasks/main.yml index 6884af5ff..6843a740d 100644 --- a/ansible/roles/ipa-images/tasks/main.yml +++ b/ansible/roles/ipa-images/tasks/main.yml @@ -62,28 +62,22 @@ - block: - name: Gather facts about Ironic Python Agent (IPA) kernel image - os_image_facts: + os_image_info: auth_type: "{{ ipa_images_openstack_auth_type }}" auth: "{{ ipa_images_openstack_auth }}" cacert: "{{ ipa_images_openstack_cacert | default(omit, true) }}" interface: "{{ ipa_images_openstack_interface | default(omit, true) }}" image: "{{ ipa_images_kernel_name }}" - - - name: Set a fact containing the Ironic Python Agent (IPA) kernel image - set_fact: - ipa_images_kernel_openstack_image: "{{ openstack_image if openstack_image else {} }}" + register: ipa_images_kernel - name: Gather facts about Ironic Python Agent (IPA) ramdisk image - os_image_facts: + os_image_info: auth_type: "{{ ipa_images_openstack_auth_type }}" auth: "{{ ipa_images_openstack_auth }}" cacert: "{{ ipa_images_openstack_cacert | default(omit, true) }}" interface: "{{ ipa_images_openstack_interface | default(omit, true) }}" image: "{{ ipa_images_ramdisk_name }}" - - - name: Set a fact containing the Ironic Python Agent (IPA) ramdisk image - set_fact: - ipa_images_ramdisk_openstack_image: "{{ openstack_image if openstack_image else {} }}" + register: ipa_images_ramdisk # The os_image module will get confused if there are multiple images with the # same name, so rename the old images. They will still be accessible via UUID. @@ -94,13 +88,13 @@ extension: "{{ item.created_at | replace(':', '-') }}~" with_items: - name: "{{ ipa_images_kernel_name }}" - created_at: "{{ ipa_images_kernel_openstack_image.created_at | default }}" + created_at: "{{ ipa_images_kernel.openstack_image.created_at | default }}" checksum: "{{ ipa_images_checksum.results[0].stat.checksum }}" - glance_checksum: "{{ ipa_images_kernel_openstack_image.checksum | default }}" + glance_checksum: "{{ ipa_images_kernel.openstack_image.checksum | default }}" - name: "{{ ipa_images_ramdisk_name }}" - created_at: "{{ ipa_images_ramdisk_openstack_image.created_at | default }}" + created_at: "{{ ipa_images_ramdisk.openstack_image.created_at | default }}" checksum: "{{ ipa_images_checksum.results[1].stat.checksum }}" - glance_checksum: "{{ ipa_images_ramdisk_openstack_image.checksum | default }}" + glance_checksum: "{{ ipa_images_ramdisk.openstack_image.checksum | default }}" when: - item.glance_checksum - item.checksum != item.glance_checksum diff --git a/ansible/roles/kolla-ansible/tasks/install.yml b/ansible/roles/kolla-ansible/tasks/install.yml index 8082090a0..c0d3f09e6 100644 --- a/ansible/roles/kolla-ansible/tasks/install.yml +++ b/ansible/roles/kolla-ansible/tasks/install.yml @@ -67,7 +67,7 @@ # Limit the version of ansible used by kolla-ansible to avoid new # releases from breaking tested code. Changes to this limit should be # tested. - - ansible>=2.9,<2.10,!=2.9.8,!=2.9.12 + - ansible>=2.9,<2.11,!=2.9.8,!=2.9.12 - selinux pip: name: "{{ (kolla_ansible_packages + kolla_ansible_venv_extra_requirements) | select | list }}" diff --git a/ansible/roles/kolla-ansible/vars/Debian.yml b/ansible/roles/kolla-ansible/vars/Debian.yml index b9b871a4d..d2ae5c23d 100644 --- a/ansible/roles/kolla-ansible/vars/Debian.yml +++ b/ansible/roles/kolla-ansible/vars/Debian.yml @@ -6,4 +6,4 @@ kolla_ansible_package_dependencies: - libssl-dev - python3-dev - python3-pip - - python3-venv + - python3-virtualenv diff --git a/ansible/roles/kolla-openstack/.yamllint b/ansible/roles/kolla-openstack/.yamllint index a4d53d6c4..a0270865d 100644 --- a/ansible/roles/kolla-openstack/.yamllint +++ b/ansible/roles/kolla-openstack/.yamllint @@ -1,3 +1,4 @@ +--- extends: default rules: diff --git a/ansible/roles/kolla-openstack/molecule/collections.yml b/ansible/roles/kolla-openstack/molecule/collections.yml new file mode 100644 index 000000000..8d76889c2 --- /dev/null +++ b/ansible/roles/kolla-openstack/molecule/collections.yml @@ -0,0 +1,3 @@ +--- +collections: + - community.molecule diff --git a/ansible/roles/kolla-openstack/molecule/default/playbook.yml b/ansible/roles/kolla-openstack/molecule/default/converge.yml similarity index 100% rename from ansible/roles/kolla-openstack/molecule/default/playbook.yml rename to ansible/roles/kolla-openstack/molecule/default/converge.yml diff --git a/ansible/roles/kolla-openstack/molecule/default/create.yml b/ansible/roles/kolla-openstack/molecule/default/create.yml index e8af20f26..f44cd2fc0 100644 --- a/ansible/roles/kolla-openstack/molecule/default/create.yml +++ b/ansible/roles/kolla-openstack/molecule/default/create.yml @@ -7,7 +7,7 @@ molecule_file: "{{ lookup('env', 'MOLECULE_FILE') }}" molecule_ephemeral_directory: "{{ lookup('env', 'MOLECULE_EPHEMERAL_DIRECTORY') }}" molecule_scenario_directory: "{{ lookup('env', 'MOLECULE_SCENARIO_DIRECTORY') }}" - molecule_yml: "{{ lookup('file', molecule_file) | molecule_from_yaml }}" + molecule_yml: "{{ lookup('file', molecule_file) | community.molecule.from_yaml }}" tasks: - name: Create Dockerfiles from image names template: diff --git a/ansible/roles/kolla-openstack/molecule/default/destroy.yml b/ansible/roles/kolla-openstack/molecule/default/destroy.yml index 3ce74788e..59c2929ce 100644 --- a/ansible/roles/kolla-openstack/molecule/default/destroy.yml +++ b/ansible/roles/kolla-openstack/molecule/default/destroy.yml @@ -6,7 +6,7 @@ no_log: "{{ not lookup('env', 'MOLECULE_DEBUG') | bool }}" vars: molecule_file: "{{ lookup('env', 'MOLECULE_FILE') }}" - molecule_yml: "{{ lookup('file', molecule_file) | molecule_from_yaml }}" + molecule_yml: "{{ lookup('file', molecule_file) | community.molecule.from_yaml }}" tasks: - name: Destroy molecule instance(s) docker_container: diff --git a/ansible/roles/kolla-openstack/molecule/default/molecule.yml b/ansible/roles/kolla-openstack/molecule/default/molecule.yml index 7018952ce..7788511f5 100644 --- a/ansible/roles/kolla-openstack/molecule/default/molecule.yml +++ b/ansible/roles/kolla-openstack/molecule/default/molecule.yml @@ -1,10 +1,12 @@ --- dependency: name: galaxy + options: + requirements-file: molecule/collections.yml driver: name: docker -lint: - name: yamllint +lint: | + yamllint . platforms: - name: centos-8 image: centos:8 diff --git a/ansible/roles/kolla-openstack/molecule/enable-everything/playbook.yml b/ansible/roles/kolla-openstack/molecule/enable-everything/converge.yml similarity index 100% rename from ansible/roles/kolla-openstack/molecule/enable-everything/playbook.yml rename to ansible/roles/kolla-openstack/molecule/enable-everything/converge.yml diff --git a/ansible/roles/kolla-openstack/molecule/enable-everything/create.yml b/ansible/roles/kolla-openstack/molecule/enable-everything/create.yml index 10fac3149..93bf57d10 100644 --- a/ansible/roles/kolla-openstack/molecule/enable-everything/create.yml +++ b/ansible/roles/kolla-openstack/molecule/enable-everything/create.yml @@ -8,7 +8,7 @@ molecule_file: "{{ lookup('env', 'MOLECULE_FILE') }}" molecule_ephemeral_directory: "{{ lookup('env', 'MOLECULE_EPHEMERAL_DIRECTORY') }}" molecule_scenario_directory: "{{ lookup('env', 'MOLECULE_SCENARIO_DIRECTORY') }}" - molecule_yml: "{{ lookup('file', molecule_file) | molecule_from_yaml }}" + molecule_yml: "{{ lookup('file', molecule_file) | community.molecule.from_yaml }}" tasks: - name: Create Dockerfiles from image names template: diff --git a/ansible/roles/kolla-openstack/molecule/enable-everything/destroy.yml b/ansible/roles/kolla-openstack/molecule/enable-everything/destroy.yml index 3ce74788e..59c2929ce 100644 --- a/ansible/roles/kolla-openstack/molecule/enable-everything/destroy.yml +++ b/ansible/roles/kolla-openstack/molecule/enable-everything/destroy.yml @@ -6,7 +6,7 @@ no_log: "{{ not lookup('env', 'MOLECULE_DEBUG') | bool }}" vars: molecule_file: "{{ lookup('env', 'MOLECULE_FILE') }}" - molecule_yml: "{{ lookup('file', molecule_file) | molecule_from_yaml }}" + molecule_yml: "{{ lookup('file', molecule_file) | community.molecule.from_yaml }}" tasks: - name: Destroy molecule instance(s) docker_container: diff --git a/ansible/roles/kolla-openstack/molecule/enable-everything/molecule.yml b/ansible/roles/kolla-openstack/molecule/enable-everything/molecule.yml index 9ac69ef36..9d00c8284 100644 --- a/ansible/roles/kolla-openstack/molecule/enable-everything/molecule.yml +++ b/ansible/roles/kolla-openstack/molecule/enable-everything/molecule.yml @@ -1,10 +1,12 @@ --- dependency: name: galaxy + options: + requirements-file: molecule/collections.yml driver: name: docker -lint: - name: yamllint +lint: | + yamllint . platforms: - name: centos-8 image: centos:8 diff --git a/releasenotes/notes/ansible_max_2_10-f54a5e6fbae5db91.yaml b/releasenotes/notes/ansible_max_2_10-f54a5e6fbae5db91.yaml new file mode 100644 index 000000000..c5d611d08 --- /dev/null +++ b/releasenotes/notes/ansible_max_2_10-f54a5e6fbae5db91.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + Updates the maximum supported version of Ansible from 2.9 to 2.10. The + minimum supported version stays at 2.9. This is true for both Kayobe and + Kolla Ansible. diff --git a/requirements.txt b/requirements.txt index a735443cc..ed81d1d11 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ pbr>=2.0 # Apache-2.0 -ansible>=2.9.0,<2.10.0,!=2.9.8,!=2.9.12 # GPLv3 +ansible>=2.9.0,<2.11.0,!=2.9.8,!=2.9.12 # GPLv3 cliff>=3.1.0 # Apache netaddr!=0.7.16,>=0.7.13 # BSD PyYAML>=3.10.0 # MIT diff --git a/test-requirements.txt b/test-requirements.txt index 194c468c7..8a3a21ffc 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -8,9 +8,12 @@ coverage>=4.0 # Apache-2.0 doc8 # Apache-2.0 docker # Apache-2.0 hacking>=3.0.1,<3.1.0 # Apache-2.0 -molecule<3 # MIT +molecule # MIT +molecule-docker # MIT oslotest>=1.10.0 # Apache-2.0 # paramiko 2.5.0 makes the kayobe-tox-molecule job fail. paramiko +pytest-molecule # MIT +pytest-testinfra stestr # Apache-2.0 yamllint # GPLv3