Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aos
GitHub Repository: aos/ansible
Path: blob/devel/test/integration/targets/apt/tasks/apt-multiarch.yml
4751 views
1
# verify that apt is handling multi-arch systems properly
2
- name: add architecture {{ apt_foreign_arch }}
3
command: dpkg --add-architecture {{ apt_foreign_arch }}
4
5
- name: install hello:{{ apt_foreign_arch }} with apt
6
apt: pkg=hello:{{ apt_foreign_arch }} state=present update_cache=yes
7
register: apt_result
8
until: apt_result is success
9
10
- name: uninstall hello:{{ apt_foreign_arch }} with apt
11
apt: pkg=hello:{{ apt_foreign_arch }} state=absent purge=yes
12
13
- name: install deb file
14
apt: deb="/var/cache/apt/archives/hello_{{ hello_version.stdout }}_{{ apt_foreign_arch }}.deb"
15
register: apt_multi_initial
16
17
- name: install deb file again
18
apt: deb="/var/cache/apt/archives/hello_{{ hello_version.stdout }}_{{ apt_foreign_arch }}.deb"
19
register: apt_multi_secondary
20
21
- name: verify installation of hello:{{ apt_foreign_arch }}
22
assert:
23
that:
24
- "apt_multi_initial.changed"
25
- "not apt_multi_secondary.changed"
26
27
- name: remove all {{ apt_foreign_arch }} packages
28
apt:
29
name: "*:{{ apt_foreign_arch }}"
30
state: absent
31
purge: yes
32
33
- name: remove {{ apt_foreign_arch }} architecture
34
command: dpkg --remove-architecture {{ apt_foreign_arch }}
35
36