From 8774b2f697f01e694b87b93b94060fffdef15da9 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Tue, 11 Feb 2020 13:35:10 -0800 Subject: [PATCH] Use `package` for `pkgng` and `zypper` in tests. This allows tests to run on other platforms when `pkgng` or `zypper` are not present. --- test/integration/targets/apache2_module/tasks/actualtest.yml | 2 +- test/integration/targets/hg/tasks/install.yml | 2 +- test/integration/targets/hg/tasks/uninstall.yml | 2 +- test/integration/targets/lookup_passwordstore/tasks/package.yml | 2 +- test/integration/targets/pull/cleanup.yml | 2 +- test/integration/targets/setup_mysql_db/tasks/main.yml | 2 +- test/integration/targets/xml/tasks/main.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/integration/targets/apache2_module/tasks/actualtest.yml b/test/integration/targets/apache2_module/tasks/actualtest.yml index 03d1914efbf..d780e92caaa 100644 --- a/test/integration/targets/apache2_module/tasks/actualtest.yml +++ b/test/integration/targets/apache2_module/tasks/actualtest.yml @@ -23,7 +23,7 @@ - libapache2-mod-evasive - name: install apache via zypper - zypper: + package: name: apache2 state: present when: "ansible_os_family == 'Suse'" diff --git a/test/integration/targets/hg/tasks/install.yml b/test/integration/targets/hg/tasks/install.yml index 618f0dda70f..4c9e5a41fc7 100644 --- a/test/integration/targets/hg/tasks/install.yml +++ b/test/integration/targets/hg/tasks/install.yml @@ -32,7 +32,7 @@ when: ansible_pkg_mgr == 'yum' - name: install mercurial (pkgng) - pkgng: + package: name: mercurial when: ansible_pkg_mgr == 'pkgng' diff --git a/test/integration/targets/hg/tasks/uninstall.yml b/test/integration/targets/hg/tasks/uninstall.yml index 57456fd02df..d1bede707dd 100644 --- a/test/integration/targets/hg/tasks/uninstall.yml +++ b/test/integration/targets/hg/tasks/uninstall.yml @@ -29,7 +29,7 @@ when: ansible_pkg_mgr == 'yum' - name: uninstall packages which were not originally installed (pkgng) - pkgng: + package: name: mercurial state: absent autoremove: yes diff --git a/test/integration/targets/lookup_passwordstore/tasks/package.yml b/test/integration/targets/lookup_passwordstore/tasks/package.yml index 136273efd94..fdb3bf7c818 100644 --- a/test/integration/targets/lookup_passwordstore/tasks/package.yml +++ b/test/integration/targets/lookup_passwordstore/tasks/package.yml @@ -24,7 +24,7 @@ dest: /etc/zypp/repos.d/security:privacy.repo - name: SUSE | Install package - zypper: + package: name: password-store state: present update_cache: yes diff --git a/test/integration/targets/pull/cleanup.yml b/test/integration/targets/pull/cleanup.yml index 5c0dc5117b1..68686964e96 100644 --- a/test/integration/targets/pull/cleanup.yml +++ b/test/integration/targets/pull/cleanup.yml @@ -9,7 +9,7 @@ when: git_install.changed - name: remove auto-installed packages from FreeBSD - pkgng: + package: name: git state: absent autoremove: yes diff --git a/test/integration/targets/setup_mysql_db/tasks/main.yml b/test/integration/targets/setup_mysql_db/tasks/main.yml index 7a128caf531..990cdb6e63d 100644 --- a/test/integration/targets/setup_mysql_db/tasks/main.yml +++ b/test/integration/targets/setup_mysql_db/tasks/main.yml @@ -64,7 +64,7 @@ notify: cleanup mysql - name: install mysqldb_test FreeBSD dependencies - pkgng: + package: name: "{{ mysql_packages }}" state: present when: ansible_os_family == "FreeBSD" diff --git a/test/integration/targets/xml/tasks/main.yml b/test/integration/targets/xml/tasks/main.yml index 66cdb8599ec..9b8f2c3678f 100644 --- a/test/integration/targets/xml/tasks/main.yml +++ b/test/integration/targets/xml/tasks/main.yml @@ -2,7 +2,7 @@ setup: - name: Install lxml (FreeBSD) - pkgng: + package: name: '{{ "py27-lxml" if ansible_python.version.major == 2 else "py36-lxml" }}' state: present when: ansible_os_family == "FreeBSD"