Added tests

This commit is contained in:
2021-06-23 13:52:08 +12:00
parent 812a49bdb9
commit c0819f9648
2 changed files with 18 additions and 17 deletions

View File

@@ -5,6 +5,16 @@
hosts: all
gather_facts: false
tasks:
- name: Example assertion
- name: install httpd-itk
dnf:
name: httpd-itk
update_cache: true
state: installed
- name: Gather the package facts
package_facts:
manager: auto
- name: Is httpd-itk installed?
assert:
that: true
that: "'httpd-itk' in ansible_facts.packages"

View File

@@ -5,25 +5,16 @@
hosts: all
gather_facts: false
tasks:
- name: Get ravens config
shell: cat /etc/yum.repos.d/raven*
register: hellfire
- debug:
msg: "{{ hellfire.stdout_lines }}"
- name: Check available packages
shell: dnf --enablerepo raven search itk
register: shellout
- debug:
msg: "{{ shellout.stdout }}"
- name: install httpd-itk
dnf:
name: httpd-itk
update_cache: true
state: installed
- name: Example assertion
- name: Gather the package facts
package_facts:
manager: auto
- name: Is httpd-itk installed?
assert:
that: true
that: "'httpd-itk' in ansible_facts.packages"