WIP
parent
3b2b03bd97
commit
755ba734fb
@ -1,6 +1,4 @@
|
|||||||
- import_playbook: setup/all.yml
|
- import_playbook: setup/all.yml
|
||||||
tags: setup
|
tags: setup
|
||||||
- import_playbook: regression/all.yml
|
|
||||||
tags: regression
|
|
||||||
- import_playbook: integration/all.yml
|
- import_playbook: integration/all.yml
|
||||||
tags: integration
|
tags: integration
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
---
|
---
|
||||||
pkg_mgr_python_interpreter: python
|
pkg_mgr_python_interpreter: python
|
||||||
|
pkg_repos_gpg_keys: []
|
||||||
pkg_repos_overrides: []
|
pkg_repos_overrides: []
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
pkg_repos_gpg_keys:
|
||||||
|
- src: debian-archive-bullseye-automatic.gpg # Debian 11
|
||||||
|
- src: debian-archive-bookworm-automatic.gpg # Debian 12
|
@ -0,0 +1,69 @@
|
|||||||
|
- name: integration/package_managers/all.yml
|
||||||
|
hosts: test-targets
|
||||||
|
gather_facts: true
|
||||||
|
# Most OS package managers need root. Homebrew refuses to run as root. This
|
||||||
|
# approximates "pkg_mgr == homebrew" for the Linux & macOS runners in CI.
|
||||||
|
become: "{{ inventory_hostname in (groups.linux | default([])) }}"
|
||||||
|
vars:
|
||||||
|
ansible_python_interpreter: auto
|
||||||
|
package: rsync # Chosen to exist in all tested distros/package managers
|
||||||
|
tasks:
|
||||||
|
- name: Switch to archived package repositories
|
||||||
|
copy:
|
||||||
|
dest: "{{ item.dest }}"
|
||||||
|
content: "{{ item.content }}"
|
||||||
|
mode: u=rw,go=r
|
||||||
|
loop: "{{ pkg_repos_overrides }}"
|
||||||
|
loop_control:
|
||||||
|
label: "{{ item.dest }}"
|
||||||
|
|
||||||
|
- name: Add signing keys
|
||||||
|
copy:
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "/etc/apt/trusted.gpg.d/{{ item.src | basename }}"
|
||||||
|
mode: u=rw,go=r
|
||||||
|
loop: "{{ pkg_repos_gpg_keys }}"
|
||||||
|
|
||||||
|
- name: Update package index
|
||||||
|
apt:
|
||||||
|
update_cache: true
|
||||||
|
when:
|
||||||
|
- ansible_facts.pkg_mgr in ["apt"]
|
||||||
|
|
||||||
|
- name: Test package module 1st call
|
||||||
|
package:
|
||||||
|
name: "{{ package }}"
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Test package module 2nd call
|
||||||
|
package:
|
||||||
|
name: "{{ package }}"
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Test dnf module 1st call
|
||||||
|
dnf:
|
||||||
|
name: "{{ package }}"
|
||||||
|
state: present
|
||||||
|
when:
|
||||||
|
- ansible_facts.pkg_mgr == 'dnf'
|
||||||
|
|
||||||
|
- name: Test dnf module 2nd call
|
||||||
|
dnf:
|
||||||
|
name: "{{ package }}"
|
||||||
|
state: present
|
||||||
|
when:
|
||||||
|
- ansible_facts.pkg_mgr == 'dnf'
|
||||||
|
|
||||||
|
- name: Test apt module 1st call
|
||||||
|
apt:
|
||||||
|
name: "{{ package }}"
|
||||||
|
state: present
|
||||||
|
when:
|
||||||
|
- ansible_facts.pkg_mgr == 'apt'
|
||||||
|
|
||||||
|
- name: Test apt module 2nd call
|
||||||
|
apt:
|
||||||
|
name: "{{ package }}"
|
||||||
|
state: present
|
||||||
|
when:
|
||||||
|
- ansible_facts.pkg_mgr == 'apt'
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue