Path: blob/devel/test/integration/targets/apt/tasks/apt-multiarch.yml
4751 views
# verify that apt is handling multi-arch systems properly1- name: add architecture {{ apt_foreign_arch }}2command: dpkg --add-architecture {{ apt_foreign_arch }}34- name: install hello:{{ apt_foreign_arch }} with apt5apt: pkg=hello:{{ apt_foreign_arch }} state=present update_cache=yes6register: apt_result7until: apt_result is success89- name: uninstall hello:{{ apt_foreign_arch }} with apt10apt: pkg=hello:{{ apt_foreign_arch }} state=absent purge=yes1112- name: install deb file13apt: deb="/var/cache/apt/archives/hello_{{ hello_version.stdout }}_{{ apt_foreign_arch }}.deb"14register: apt_multi_initial1516- name: install deb file again17apt: deb="/var/cache/apt/archives/hello_{{ hello_version.stdout }}_{{ apt_foreign_arch }}.deb"18register: apt_multi_secondary1920- name: verify installation of hello:{{ apt_foreign_arch }}21assert:22that:23- "apt_multi_initial.changed"24- "not apt_multi_secondary.changed"2526- name: remove all {{ apt_foreign_arch }} packages27apt:28name: "*:{{ apt_foreign_arch }}"29state: absent30purge: yes3132- name: remove {{ apt_foreign_arch }} architecture33command: dpkg --remove-architecture {{ apt_foreign_arch }}343536