Debian Codegraph @

ansible_collections/community/general/tests/integration/targets/setup_pkg_mgr/tasks/archlinux.yml

raw
1 ---
2 # Copyright (c) Ansible Project
3 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
4 # SPDX-License-Identifier: GPL-3.0-or-later
5
6 # Since Arch Linux is a rolling distribution, it regularly needs its packages upgraded, otherwise some tests might
7 # stop working due to conflicts during package installation. Since there is no good way to do this on container
8 # startup time, we use the setup_pkg_mgr setup role to do this once per CI run (hopefully). In case the Arch Linux
9 # tests are run outside of a container, we're using a date-based tag (see below) to avoid this running more than
10 # once per day.
11
12 - name: Create tag
13 copy:
14 dest: /tmp/.ansible_archlinux_sysupgrade_tag
15 content: |
16 Last ArchLinux system upgrade by integration tests was done on {{ ansible_facts.date_time.date }}.
17 register: archlinux_upgrade_tag
18
19 - name: Upgrade all packages
20 pacman:
21 update_cache: true
22 upgrade: true
23 when: archlinux_upgrade_tag is changed
24
25 - name: Remove EXTERNALLY-MANAGED file
26 file:
27 path: /usr/lib/python{{ ansible_facts.python.version.major }}.{{ ansible_facts.python.version.minor }}/EXTERNALLY-MANAGED
28 state: absent