]> git.arvados.org - arvados.git/blob - tools/ansible/setup-package-tests.yml
Merge branch '22922-bundler-2.5'
[arvados.git] / tools / ansible / setup-package-tests.yml
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: Apache-2.0
4 #
5 # This playbook sets up a Docker image to run Arvados package tests.
6 # It's meant to be used with `build-docker-image.yml`.
7
8 - name: Bootstrap nodes
9   hosts: all
10   gather_facts: no
11   tasks:
12     - ansible.builtin.include_role:
13         name: distro_bootstrap
14
15 - name: Group nodes by package manager
16   hosts: all
17   tasks:
18     - ansible.builtin.group_by:
19         key: "pkg_mgr_{{ ansible_pkg_mgr }}"
20
21     - ansible.builtin.include_role:
22         name: distro_packages
23       vars:
24         task_name: Install package test dependencies
25         package_names:
26           - diffutils
27           - findutils
28
29 - name: Setup apt nodes
30   hosts: pkg_mgr_apt
31   tasks:
32     - name: Install apt repository
33       ansible.builtin.deb822_repository:
34         name: arvados_pkgtest
35         types: deb
36         uris: "file:///arvados/packages/{{ ansible_distribution|lower }}{{ ansible_distribution_version|replace('.', '') if ansible_distribution == 'Ubuntu' else ansible_distribution_major_version }}"
37         suites:
38           - "/"
39         trusted: true
40
41 - name: Setup dnf nodes
42   hosts: pkg_mgr_dnf
43   tasks:
44     - name: Install RHEL test dependencies
45       ansible.builtin.dnf:
46         name:
47           - cpio
48
49     - ansible.builtin.include_role:
50         name: distro_dnf
51       vars:
52         arvados_dnf_modules:
53           - postgresql
54           - python
55           - ruby
56
57     - name: Enable development repository
58       community.general.ini_file:
59         path: "/etc/yum.repos.d/{{ arvados_pkgtest_dnf_devel_basename|default('rocky-devel') }}.repo"
60         section: "{{ arvados_pkgtest_dnf_devel_section|default('devel') }}"
61         option: enabled
62         value: "1"
63         create: false
64
65     - name: Create test package repository
66       ansible.builtin.yum_repository:
67         name: arvados-test
68         description: Arvados Test Packages
69         baseurl: "file:///arvados/packages/{{ ansible_distribution|lower }}{{ ansible_distribution_major_version }}"
70         enabled: true
71         gpgcheck: false