diff options
author | Rick Elrod <rick@elrod.me> | 2021-01-22 05:58:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-22 05:58:31 +0100 |
commit | 1934ca9a550b32f16d6fadffe7d8031059fa2526 (patch) | |
tree | a6f82ebe20eab77b18590de04b0c604e66b85d44 /test/integration/targets/apt | |
parent | [ansible-test] First attempt at freebsd/11.4 (#72655) (diff) | |
download | ansible-1934ca9a550b32f16d6fadffe7d8031059fa2526.tar.xz ansible-1934ca9a550b32f16d6fadffe7d8031059fa2526.zip |
Add Ubuntu 20.04 to CI and ansible-test (#69161)
Change:
- Add Ubuntu 20.04 to CI now that venv is default instead of virtualenv in ansible-test.
Test Plan:
- CI
Tickets:
- Fixes #69203
Signed-off-by: Rick Elrod <rick@elrod.me>
Diffstat (limited to 'test/integration/targets/apt')
-rw-r--r-- | test/integration/targets/apt/tasks/apt-builddep.yml | 6 | ||||
-rw-r--r-- | test/integration/targets/apt/tasks/apt-multiarch.yml | 27 | ||||
-rw-r--r-- | test/integration/targets/apt/tasks/apt.yml | 3 | ||||
-rw-r--r-- | test/integration/targets/apt/vars/Ubuntu-20.yml | 1 | ||||
-rw-r--r-- | test/integration/targets/apt/vars/default.yml | 1 |
5 files changed, 28 insertions, 10 deletions
diff --git a/test/integration/targets/apt/tasks/apt-builddep.yml b/test/integration/targets/apt/tasks/apt-builddep.yml index d35c90b258..24ee1dc2ba 100644 --- a/test/integration/targets/apt/tasks/apt-builddep.yml +++ b/test/integration/targets/apt/tasks/apt-builddep.yml @@ -29,9 +29,9 @@ when: dpkg_result is successful tags: ['test_apt_builddep'] -# install build-dep for netcat -- name: install netcat build-dep with apt - apt: pkg=netcat state=build-dep +# install build-dep for rolldice +- name: install rolldice build-dep with apt + apt: pkg=rolldice state=build-dep register: apt_result tags: ['test_apt_builddep'] diff --git a/test/integration/targets/apt/tasks/apt-multiarch.yml b/test/integration/targets/apt/tasks/apt-multiarch.yml index 6241664de2..df008d474a 100644 --- a/test/integration/targets/apt/tasks/apt-multiarch.yml +++ b/test/integration/targets/apt/tasks/apt-multiarch.yml @@ -1,24 +1,37 @@ # verify that apt is handling multi-arch systems properly + +- name: load version specific vars + include_vars: '{{ item }}' + with_first_found: + - files: + - '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml' + - 'default.yml' + paths: '../vars' + - name: add architecture {{ apt_foreign_arch }} command: dpkg --add-architecture {{ apt_foreign_arch }} -- name: install hello:{{ apt_foreign_arch }} with apt - apt: pkg=hello:{{ apt_foreign_arch }} state=present update_cache=yes +- name: install {{ multiarch_test_pkg }}:{{ apt_foreign_arch }} with apt + apt: pkg={{ multiarch_test_pkg }}:{{ apt_foreign_arch }} state=present update_cache=yes register: apt_result until: apt_result is success -- name: uninstall hello:{{ apt_foreign_arch }} with apt - apt: pkg=hello:{{ apt_foreign_arch }} state=absent purge=yes +- name: check {{ multiarch_test_pkg }} version + shell: dpkg -s {{ multiarch_test_pkg }} | grep Version | awk '{print $2}' + register: pkg_version + +- name: uninstall {{ multiarch_test_pkg }}:{{ apt_foreign_arch }} with apt + apt: pkg={{ multiarch_test_pkg }}:{{ apt_foreign_arch }} state=absent purge=yes - name: install deb file - apt: deb="/var/cache/apt/archives/hello_{{ hello_version.stdout }}_{{ apt_foreign_arch }}.deb" + apt: deb="/var/cache/apt/archives/{{ multiarch_test_pkg }}_{{ pkg_version.stdout }}_{{ apt_foreign_arch }}.deb" register: apt_multi_initial - name: install deb file again - apt: deb="/var/cache/apt/archives/hello_{{ hello_version.stdout }}_{{ apt_foreign_arch }}.deb" + apt: deb="/var/cache/apt/archives/{{ multiarch_test_pkg }}_{{ pkg_version.stdout }}_{{ apt_foreign_arch }}.deb" register: apt_multi_secondary -- name: verify installation of hello:{{ apt_foreign_arch }} +- name: verify installation of {{ multiarch_test_pkg }}:{{ apt_foreign_arch }} assert: that: - "apt_multi_initial.changed" diff --git a/test/integration/targets/apt/tasks/apt.yml b/test/integration/targets/apt/tasks/apt.yml index ac79ac21d9..64314c6a6c 100644 --- a/test/integration/targets/apt/tasks/apt.yml +++ b/test/integration/targets/apt/tasks/apt.yml @@ -309,6 +309,9 @@ - name: autoclean during install apt: pkg=hello state=present autoclean=yes +- name: undo previous install + apt: pkg=hello state=absent + # https://github.com/ansible/ansible/issues/23155 - name: create a repo file copy: diff --git a/test/integration/targets/apt/vars/Ubuntu-20.yml b/test/integration/targets/apt/vars/Ubuntu-20.yml new file mode 100644 index 0000000000..7b32755fbf --- /dev/null +++ b/test/integration/targets/apt/vars/Ubuntu-20.yml @@ -0,0 +1 @@ +multiarch_test_pkg: libunistring2 diff --git a/test/integration/targets/apt/vars/default.yml b/test/integration/targets/apt/vars/default.yml new file mode 100644 index 0000000000..bed3a965d0 --- /dev/null +++ b/test/integration/targets/apt/vars/default.yml @@ -0,0 +1 @@ +multiarch_test_pkg: hello |