manage_apt_packages/molecule/with_custom_packages_vagrant/verify.yml

20 lines
711 B
YAML
Raw Permalink Normal View History

2023-11-29 18:13:41 +00:00
---
- name: Verify
hosts: all
gather_facts: true
2023-12-03 16:45:22 +00:00
become: true
2023-11-29 18:13:41 +00:00
tasks:
- name: "Test: packages mariadb-server, apache2, consul:1.13.1-1"
block:
- name: "Get packages facts"
ansible.builtin.package_facts:
manager: auto
- name: "Verify packages mariadb-server, apache2, consul:1.13.1-1"
ansible.builtin.assert:
that:
- "ansible_facts.packages['mariadb-server'][0]['name'] == 'mariadb-server'"
- "ansible_facts.packages['apache2'][0]['name'] == 'apache2'"
- "ansible_facts.packages['consul'][0]['name'] == 'consul'"
- "ansible_facts.packages['consul'][0]['version'] == '1.13.1-1'"