manage_apt_packages/molecule/with_custom_packages/verify.yml

20 lines
711 B
YAML
Raw Permalink Normal View History

---
- name: Verify
hosts: all
2023-12-03 16:45:22 +00:00
gather_facts: true
become: true
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:
2023-06-30 21:46:04 +00:00
- "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'"