You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible-msvsphere.ci/molecule/resources/tests/common/tasks/package_installed.yml

11 lines
330 B

---
- name: Collect installed packages facts
ansible.builtin.package_facts:
manager: rpm
- name: Assert that package is installed
ansible.builtin.assert:
that: "'{{ package_name }}' in ansible_facts.packages|list"
fail_msg: "{{ package_name }} is not installed"
success_msg: "{{ package_name }} is installed"