2023-06-12 21:27:00 +00:00
|
|
|
---
|
|
|
|
- name: Verify
|
|
|
|
hosts: all
|
2023-12-03 16:45:22 +00:00
|
|
|
gather_facts: true
|
|
|
|
become: true
|
2023-06-12 21:27:00 +00:00
|
|
|
tasks:
|
2023-06-30 21:02:13 +00:00
|
|
|
- name: "Test: packages mariadb-server, apache2, consul:1.13.1-1"
|
2023-06-15 21:43:14 +00:00
|
|
|
block:
|
2023-06-30 21:02:13 +00:00
|
|
|
- name: "Get packages facts"
|
|
|
|
ansible.builtin.package_facts:
|
|
|
|
manager: auto
|
2023-06-15 21:43:14 +00:00
|
|
|
|
2023-06-30 21:02:13 +00:00
|
|
|
- name: "Verify packages mariadb-server, apache2, consul:1.13.1-1"
|
2023-06-15 21:43:14 +00:00
|
|
|
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'"
|