added alias test

pull/83149/head
Brian Coca 2 months ago
parent 821fe6e8bd
commit 831f672d34

@ -1,20 +1,5 @@
# Test playbook for the package_facts module
# (c) 2017, Adam Miller <admiller@redhat.com>
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# (c) Ansible Project
- name: Prep package_fact tests - Debian Family
block:
@ -65,6 +50,17 @@
that: ansible_facts.packages is defined
when: (ansible_os_family == "openSUSE Leap") or (ansible_os_family == "Suse")
- name: Same as those above, but based on pkg_mgr, tests aliases
block:
- name: Gather package facts
package_facts:
manager: '{{ ansible_facts["pkg_mgr"] }}'
- name: check for ansible_facts.packages exists
assert:
that: ansible_facts.packages is defined
when: ansible_facts['os_family'] in ["openSUSE Leap", "Suse", "RedHat", "Debian"]
# Check that auto detection works also
- name: Gather package facts
package_facts:

Loading…
Cancel
Save