Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
moreati committed Oct 15, 2024
1 parent 3b2b03b commit f7b6608
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 55 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,6 @@ jobs:
python_version: '3.13'
tox_env: py313-mode_ansible-ansible10-strategy_linear

- name: Mito_27
tox_env: py27-mode_mitogen
- name: Mito_36
python_version: '3.6'
tox_env: py36-mode_mitogen
- name: Mito_313
python_version: '3.13'
tox_env: py313-mode_mitogen

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down Expand Up @@ -164,12 +155,6 @@ jobs:
fail-fast: false
matrix:
include:
- name: Mito_27
tox_env: py27-mode_mitogen
- name: Mito_313
python_version: '3.13'
tox_env: py313-mode_mitogen

- name: Loc_27_210
tox_env: py27-mode_localhost-ansible2.10
- name: Loc_313_10
Expand Down
2 changes: 0 additions & 2 deletions tests/ansible/all.yml
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
38 changes: 1 addition & 37 deletions tests/ansible/integration/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,4 @@
#
# This playbook imports all tests that are known to work at present.
#

- import_playbook: action/all.yml
tags: action
- import_playbook: async/all.yml
tags: async
- import_playbook: become/all.yml
tags: become
- import_playbook: connection/all.yml
tags: connection
- import_playbook: connection_delegation/all.yml
tags: connection_delegation
- import_playbook: connection_loader/all.yml
tags: connection_loader
- import_playbook: context_service/all.yml
tags: context_service
- import_playbook: glibc_caches/all.yml
tags: glibc_caches
- import_playbook: interpreter_discovery/all.yml
tags: interpreter_discovery
- import_playbook: local/all.yml
tags: local
- import_playbook: module_utils/all.yml
tags: module_utils
- import_playbook: playbook_semantics/all.yml
tags: playbook_semantics
- import_playbook: process/all.yml
tags: process
- import_playbook: runner/all.yml
tags: runner
- import_playbook: ssh/all.yml
tags: ssh
- import_playbook: strategy/all.yml
tags: strategy
- import_playbook: stub_connections/all.yml
tags: stub_connections
- import_playbook: transport_config/all.yml
tags: transport_config
- import_playbook: package_managers/all.yml
71 changes: 71 additions & 0 deletions tests/ansible/integration/package_managers/all.yml
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
dnf:
name: "{{ package }}"
state: present
when:
- ansible_facts.pkg_mgr == 'apt'

- name: Test apt module 2nd call
dnf:
name: "{{ package }}"
state: present
when:
- ansible_facts.pkg_mgr == 'apt'
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
name: "{{ package }}"
state: present

- name: Test dnf module 2nd call
- name: Test dnf module 1st call
dnf:
name: "{{ package }}"
state: present
Expand Down

0 comments on commit f7b6608

Please sign in to comment.