Files
ansible-role-repo-epel/molecule/default/verify.yml

37 lines
739 B
YAML
Raw Normal View History

2021-05-02 17:12:46 +12:00
---
# This is an example playbook to execute Ansible tests.
- name: Verify
hosts: all
tasks:
- name: Retrieve yum repofile
shell: cat /etc/yum.repos.d/epel.repo
ignore_errors: true
register: repofile
- debug:
var: repofile
- name: metalink is present
assert:
that:
- "'metalink=' in repofile.stdout"
2023-08-19 22:38:57 +12:00
# - name: baseurl is not defined
# assert:
# that:
# - "'baseurl=' not in repofile.stdout"
- name: try to install htop from EPEL
package:
name: htop
state: latest
- name: Gather the rpm package facts
package_facts:
manager: auto
- name: is htop actually installed?
assert:
2021-05-02 23:17:27 +12:00
that: "'htop' in ansible_facts.packages"