Skip to content

Commit

Permalink
tests: Regression test for mitogen-hq#776 (package/yum/dnf module cal…
Browse files Browse the repository at this point in the history
…led twice)
  • Loading branch information
moreati committed Jul 4, 2022
1 parent 5159a19 commit 522c786
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/ansible/regression/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
- import_playbook: issue_591__setuptools_cwd_crash.yml
- import_playbook: issue_615__streaming_transfer.yml
- import_playbook: issue_655__wait_for_connection_error.yml
- import_playbook: issue_776__load_plugins_called_twice.yml
38 changes: 38 additions & 0 deletions tests/ansible/regression/issue_776__load_plugins_called_twice.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# https://github.com/mitogen-hq/mitogen/issues/776
---
- name: regression/issue_776__load_plugins_called_twice.yml
hosts: test-targets
become: true
gather_facts: yes
tags:
- issue_776
tasks:
- name: Update package index
apt:
update_cache: true
when:
- ansible_facts.pkg_mgr in ["apt"]

- name: Test package module 1st call
package:
name: sqlite
state: present

- name: Test package module 2nd call
package:
name: sqlite
state: present

- name: Test dnf module 2nd call
dnf:
name: sqlite
state: present
when:
- ansible_facts.pkg_mgr == 'dnf'

- name: Test dnf module 2nd call
dnf:
name: sqlite
state: present
when:
- ansible_facts.pkg_mgr == 'dnf'

0 comments on commit 522c786

Please sign in to comment.