From d8ec17cab044f5ff3fea4387965d02b09b8613bd Mon Sep 17 00:00:00 2001 From: Lukas Kranz Date: Mon, 10 Jun 2024 07:58:27 +0200 Subject: [PATCH] Remove get_md5 parameter from stat module. The get_md5 parameter was removed with ansible 9. https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_9.html#id44 If it is being used the following error appears: "Unsupported parameters for (stat) module: get_md5..." Unrelated, but also blocking testing/merging of this change, the Ansible version specs for older python versions is loosened to allow installing older versions of Ansible on test nodes (like focal) that have older pythons that are unsupported by newer Ansible. Change-Id: I99dd4f16fde659d84eb3dfa191557b3d9508b0fb --- roles/build-releasenotes/tasks/main.yaml | 1 - roles/ensure-babel/tasks/main.yaml | 1 - roles/ensure-if-python/tasks/main.yaml | 1 - roles/ensure-javascript-build-tool/tasks/main.yaml | 1 - roles/ensure-javascript-packages/tasks/main.yaml | 2 -- roles/fetch-javascript-output/tasks/main.yaml | 6 ------ roles/fetch-sphinx-tarball/tasks/pdf.yaml | 1 - roles/find-constraints/tasks/main.yaml | 1 - roles/js-package-manager/tasks/main.yaml | 1 - roles/nox/tasks/main.yaml | 1 - roles/sphinx/tasks/main.yaml | 2 -- roles/tox/tasks/main.yaml | 1 - test-requirements.txt | 7 ++++++- 13 files changed, 6 insertions(+), 20 deletions(-) diff --git a/roles/build-releasenotes/tasks/main.yaml b/roles/build-releasenotes/tasks/main.yaml index aba772399..4a120eacf 100644 --- a/roles/build-releasenotes/tasks/main.yaml +++ b/roles/build-releasenotes/tasks/main.yaml @@ -4,7 +4,6 @@ path: "{{ zuul_work_dir }}/releasenotes/source/locale" get_checksum: false get_mime: false - get_md5: false register: translations - name: Prepare release note translations diff --git a/roles/ensure-babel/tasks/main.yaml b/roles/ensure-babel/tasks/main.yaml index 28ce7d995..5dabbe974 100644 --- a/roles/ensure-babel/tasks/main.yaml +++ b/roles/ensure-babel/tasks/main.yaml @@ -9,7 +9,6 @@ path: "{{ constraints_file }}" get_checksum: false get_mime: false - get_md5: false register: stat_results when: constraints_file is defined diff --git a/roles/ensure-if-python/tasks/main.yaml b/roles/ensure-if-python/tasks/main.yaml index a139dc2ad..4fc954c2f 100644 --- a/roles/ensure-if-python/tasks/main.yaml +++ b/roles/ensure-if-python/tasks/main.yaml @@ -21,7 +21,6 @@ stat: get_checksum: false get_mime: false - get_md5: false path: "{{ zuul_work_dir }}/requirements.txt" register: requirements_file diff --git a/roles/ensure-javascript-build-tool/tasks/main.yaml b/roles/ensure-javascript-build-tool/tasks/main.yaml index 9a744e98f..8c429ab3e 100644 --- a/roles/ensure-javascript-build-tool/tasks/main.yaml +++ b/roles/ensure-javascript-build-tool/tasks/main.yaml @@ -4,7 +4,6 @@ path: "{{ zuul_work_dir }}/yarn.lock" get_checksum: false get_mime: false - get_md5: false register: yarn_lock_exists - name: Set js_build_tool fact diff --git a/roles/ensure-javascript-packages/tasks/main.yaml b/roles/ensure-javascript-packages/tasks/main.yaml index 05c9f3e1e..04945617c 100644 --- a/roles/ensure-javascript-packages/tasks/main.yaml +++ b/roles/ensure-javascript-packages/tasks/main.yaml @@ -3,7 +3,6 @@ path: "{{ tox_constraints_file }}" get_checksum: false get_mime: false - get_md5: false register: stat_results when: tox_constraints_file is defined @@ -26,7 +25,6 @@ path: "{{ zuul_work_dir }}/yarn.lock" get_checksum: false get_mime: false - get_md5: false register: yarn_lock_exists - name: Set js_build_tool fact diff --git a/roles/fetch-javascript-output/tasks/main.yaml b/roles/fetch-javascript-output/tasks/main.yaml index ef78165f2..dd92e5e3a 100644 --- a/roles/fetch-javascript-output/tasks/main.yaml +++ b/roles/fetch-javascript-output/tasks/main.yaml @@ -22,7 +22,6 @@ path: "{{ zuul_work_dir }}/yarn.lock" get_checksum: false get_mime: false - get_md5: false register: yarn_lock - name: Check for shrinkwrap @@ -30,7 +29,6 @@ path: "{{ zuul_work_dir }}/npm-shrinkwrap.json" get_checksum: false get_mime: false - get_md5: false when: not yarn_lock.stat.exists register: shrinkwrap @@ -59,7 +57,6 @@ path: "{{ zuul_work_dir }}/reports" get_checksum: false get_mime: false - get_md5: false register: reports_stat - name: Collect npm reports @@ -77,7 +74,6 @@ path: "{{ zuul_work_dir }}/karma.subunit" get_checksum: false get_mime: false - get_md5: false register: karma_stat - name: Collect karma subunit files @@ -96,7 +92,6 @@ path: "{{ zuul_work_dir }}/npm-shrinkwrap.json" get_checksum: false get_mime: false - get_md5: false register: shrinkwrap_final - name: Collect shrinkwrap file @@ -116,7 +111,6 @@ path: "{{ zuul_work_dir }}/{{ javascript_content_dir }}" get_checksum: false get_mime: false - get_md5: false register: javascript_output - name: Collect javascript output diff --git a/roles/fetch-sphinx-tarball/tasks/pdf.yaml b/roles/fetch-sphinx-tarball/tasks/pdf.yaml index dc053fe33..067d91b3a 100644 --- a/roles/fetch-sphinx-tarball/tasks/pdf.yaml +++ b/roles/fetch-sphinx-tarball/tasks/pdf.yaml @@ -7,7 +7,6 @@ path: "{{ zuul_work_dir }}/{{ sphinx_build_dir }}/pdf/{{ zj_sphinx_pdf }}" get_checksum: false get_mime: false - get_md5: false with_items: "{{ sphinx_pdf_files }}" loop_control: loop_var: zj_sphinx_pdf diff --git a/roles/find-constraints/tasks/main.yaml b/roles/find-constraints/tasks/main.yaml index 53b42ea23..8b3720c75 100644 --- a/roles/find-constraints/tasks/main.yaml +++ b/roles/find-constraints/tasks/main.yaml @@ -3,7 +3,6 @@ path: "{{ constraints_file | default('missing') }}" get_checksum: false get_mime: false - get_md5: false register: stat_results when: constraints_file is defined diff --git a/roles/js-package-manager/tasks/main.yaml b/roles/js-package-manager/tasks/main.yaml index 359638301..8e9fc3279 100644 --- a/roles/js-package-manager/tasks/main.yaml +++ b/roles/js-package-manager/tasks/main.yaml @@ -20,7 +20,6 @@ path: "{{ zuul_work_dir }}/yarn.lock" get_checksum: false get_mime: false - get_md5: false register: yarn_lock_exists - name: Set js_build_tool fact diff --git a/roles/nox/tasks/main.yaml b/roles/nox/tasks/main.yaml index f7d28e216..d23a6df5f 100644 --- a/roles/nox/tasks/main.yaml +++ b/roles/nox/tasks/main.yaml @@ -3,7 +3,6 @@ path: "{{ nox_constraints_file }}" get_checksum: false get_mime: false - get_md5: false register: stat_results when: nox_constraints_file is defined diff --git a/roles/sphinx/tasks/main.yaml b/roles/sphinx/tasks/main.yaml index 25d94d0bf..a8102a876 100644 --- a/roles/sphinx/tasks/main.yaml +++ b/roles/sphinx/tasks/main.yaml @@ -68,7 +68,6 @@ path: "{{ zuul_work_virtualenv }}/bin/whereto" get_checksum: false get_mime: false - get_md5: false register: whereto - name: Check for htaccess @@ -76,7 +75,6 @@ path: "{{ zuul_work_dir }}/{{ sphinx_source_dir }}/_extra/.htaccess" get_checksum: false get_mime: false - get_md5: false register: htaccess - name: Run whereto diff --git a/roles/tox/tasks/main.yaml b/roles/tox/tasks/main.yaml index 8051e4a10..321b3e83c 100644 --- a/roles/tox/tasks/main.yaml +++ b/roles/tox/tasks/main.yaml @@ -3,7 +3,6 @@ path: "{{ tox_constraints_file }}" get_checksum: false get_mime: false - get_md5: false register: stat_results when: tox_constraints_file is defined diff --git a/test-requirements.txt b/test-requirements.txt index cddcb7442..ed94389a5 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,7 +7,12 @@ # by 4 weeks to give people time to update before any roles start # depending on new features. -ansible>=8,<9 +# Some older versions of Ansible don't support older versions of +# python we have on older test nodes, so do the best we can in those +# cases. + +ansible>=6,<9;python_version<'3.9' +ansible>=8,<9;python_version>='3.9' stestr>=1.0.0,<3.0.0;python_version<'3.5' # Apache-2.0 stestr>=1.0.0;python_version>='3.5' # Apache-2.0