Files
tripleo-repos/molecule/default/assert_ini_key_value.yml
T
Douglas Viroel a34103fffd Improve unit test coverage and molecule verifications
This patch adds more unit test to yum-config module and validations
to molecule verify step.

Change-Id: Icf4cd8463bcc5b466a6b0882e072874639ce117a
Signed-off-by: Douglas Viroel <dviroel@redhat.com>
2021-09-28 09:21:08 -03:00

24 lines
649 B
YAML

---
- name: Get the content of {{ item.name }} repo
command: "cat {{ item.path }}"
register: file_output
- name: Print {{ item.name }} repo content
debug:
msg:
- "Content of {{ item.name }} repo located at '{{ item.path }}'"
- "{{ file_output.stdout_lines }}"
- set_fact:
tmp_repo_file: /tmp/{{ item.name|lower }}.temp
- name: Retrieve remote repo ini file
fetch:
src: "{{ item.path }}"
dest: "{{ tmp_repo_file }}"
flat: yes
- assert:
that:
- "{{ lookup('ini', '{{ item.key }} section={{ item.section|lower }} file={{ tmp_repo_file }}') }} == {{ item.value }}"