-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
73 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
- import_playbook: setup/all.yml | ||
tags: setup | ||
- import_playbook: regression/all.yml | ||
tags: regression | ||
- import_playbook: integration/all.yml | ||
tags: integration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
- name: integration/package_managers/all.yml | ||
hosts: test-targets | ||
gather_facts: true | ||
become: true | ||
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: | ||
- src: debian-archive-bullseye-automatic.gpg # Debian 11 | ||
- src: debian-archive-bookworm-automatic.gpg # Debian 12 | ||
when: | ||
- ansible_facts.distribution == "Debian" | ||
|
||
- 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 added
BIN
+5.7 KB
tests/ansible/integration/package_managers/files/debian-archive-bookworm-automatic.gpg
Binary file not shown.
Binary file added
BIN
+5.7 KB
tests/ansible/integration/package_managers/files/debian-archive-bullseye-automatic.gpg
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters