Debian Codegraph @

test/integration/targets/apt/tasks/main.yml

raw
1 # Copyright (c) 2014, James Tanner <[email protected]>
2 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
3
4 - name: skip test on unsupported platforms
5 meta: end_play
6 when: ansible_distribution not in ('Ubuntu', 'Debian')
7
8 - block:
9 - import_tasks: 'apt.yml'
10
11 - import_tasks: 'apt_deb_depend.yml'
12
13 - import_tasks: 'url-with-deps.yml'
14
15 - import_tasks: 'apt-multiarch.yml'
16
17 - import_tasks: 'apt-builddep.yml'
18
19 - import_tasks: 'apt_update.yml'
20
21 - block:
22 - import_tasks: 'repo.yml'
23 always:
24 - file:
25 path: /etc/apt/sources.list.d/file_tmp_repo.list
26 state: absent
27 - file:
28 name: "{{ repodir }}"
29 state: absent
30
31 always:
32 - name: Check if the target is managed by ansible-test
33 stat:
34 path: /etc/ansible-test.bootstrap
35 register: marker
36
37 - name: Ensure the EXTERNALLY-MANAGED marker is not present on the target
38 command: |
39 {{ ansible_python_interpreter | quote }}
40 -c
41 'import sysconfig; import pathlib; (pathlib.Path(sysconfig.get_path("stdlib")) / "EXTERNALLY-MANAGED").unlink(missing_ok=True);'
42 when: marker.stat.exists