From 24ca69aa05afdad8ba6b4b90fb4a6bffe02c2616 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 1 Apr 2022 22:53:05 +0200 Subject: [PATCH] CI: Remove 'warn:' that's removed in ansible-core 2.14 (#4434) * Remove 'warn:' that's removed in ansible-core 2.14. * Install virtualenv when needed. --- .../targets/dnf_versionlock/tasks/lock_updates.yml | 2 -- .../integration/targets/monit/tasks/check_state.yml | 4 ---- tests/integration/targets/monit/tasks/main.yml | 12 ++++++++++++ .../targets/pkgng/tasks/create-outofdate-pkg.yml | 1 - tests/integration/targets/setup_cron/tasks/main.yml | 2 -- .../targets/setup_postgresql_db/tasks/main.yml | 2 -- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/tests/integration/targets/dnf_versionlock/tasks/lock_updates.yml b/tests/integration/targets/dnf_versionlock/tasks/lock_updates.yml index 99fa4b072b..36130f1666 100644 --- a/tests/integration/targets/dnf_versionlock/tasks/lock_updates.yml +++ b/tests/integration/targets/dnf_versionlock/tasks/lock_updates.yml @@ -37,8 +37,6 @@ command: >- dnf update -y --setopt=obsoletes=0 {{ _packages | join(' ') }} - args: - warn: false register: update_locked_packages changed_when: '"Nothing to do" not in update_locked_packages.stdout' diff --git a/tests/integration/targets/monit/tasks/check_state.yml b/tests/integration/targets/monit/tasks/check_state.yml index 3fb2e6e929..9b5ff04293 100644 --- a/tests/integration/targets/monit/tasks/check_state.yml +++ b/tests/integration/targets/monit/tasks/check_state.yml @@ -1,7 +1,5 @@ - name: "{{ reason }} ('up')" command: "curl -sf http://localhost:8082/hello" - args: - warn: false when: service_state == 'up' register: curl_result until: not curl_result.failed @@ -10,8 +8,6 @@ - name: "{{ reason }} ('down')" command: "curl -sf http://localhost:8082/hello" - args: - warn: false register: curl_result failed_when: curl_result == 0 when: service_state == 'down' diff --git a/tests/integration/targets/monit/tasks/main.yml b/tests/integration/targets/monit/tasks/main.yml index 447140e280..21404fe15a 100644 --- a/tests/integration/targets/monit/tasks/main.yml +++ b/tests/integration/targets/monit/tasks/main.yml @@ -43,6 +43,18 @@ src: httpd_echo.py dest: "{{ process_file }}" + - name: Install virtualenv + package: + name: virtualenv + state: present + when: ansible_distribution == 'CentOS' and ansible_distribution_major_version == '8' + + - name: Install virtualenv + package: + name: python-virtualenv + state: present + when: ansible_os_family == 'Archlinux' + - name: install dependencies pip: name: "{{ item }}" diff --git a/tests/integration/targets/pkgng/tasks/create-outofdate-pkg.yml b/tests/integration/targets/pkgng/tasks/create-outofdate-pkg.yml index 94635db697..7010aeaa0a 100644 --- a/tests/integration/targets/pkgng/tasks/create-outofdate-pkg.yml +++ b/tests/integration/targets/pkgng/tasks/create-outofdate-pkg.yml @@ -21,7 +21,6 @@ - '{{ pkgng_test_outofdate_pkg_tempdir.path }}' - '--manifest' - '{{ pkgng_test_outofdate_pkg_tempdir.path }}/MANIFEST' - warn: no # pkg switched from .txz to .pkg in version 1.17.0 # Might as well look for all valid pkg extensions. diff --git a/tests/integration/targets/setup_cron/tasks/main.yml b/tests/integration/targets/setup_cron/tasks/main.yml index a53f0ecd61..5a83e025be 100644 --- a/tests/integration/targets/setup_cron/tasks/main.yml +++ b/tests/integration/targets/setup_cron/tasks/main.yml @@ -32,8 +32,6 @@ until: faketime_package_installed is success - name: Find libfaketime path shell: '{{ list_pkg_files }} {{ faketime_pkg }} | grep -F libfaketime.so.1' - args: - warn: false register: libfaketime_path - when: ansible_service_mgr == 'systemd' block: diff --git a/tests/integration/targets/setup_postgresql_db/tasks/main.yml b/tests/integration/targets/setup_postgresql_db/tasks/main.yml index 31f087f644..4812cf2ab0 100644 --- a/tests/integration/targets/setup_postgresql_db/tasks/main.yml +++ b/tests/integration/targets/setup_postgresql_db/tasks/main.yml @@ -165,8 +165,6 @@ - name: Reinstall internationalization files shell: yum -y reinstall glibc-common || yum -y install glibc-common - args: - warn: false when: locale_present is failed - name: Generate locale (RedHat)