Skip to content

Commit

Permalink
Create discovery.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
abikouo authored Feb 28, 2024
1 parent b19afe6 commit 150448c
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions tests/integration/targets/k8s_info/tasks/discovery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
# Testing fix for issue https://github.com/ansible-collections/kubernetes.core/pull/676
- vars:
kubevirt_release: "v1.1.1"
block:
- name: Delete existing namespace
kubernetes.core.k8s:
kind: namespace
namespace: kubevirt
state: absent

- name: Create kubevirt resources
kubernetes.core.k8s:
state: present
apply: true
src: "{{ item }}"
with_items:
- "https://github.com/kubevirt/kubevirt/releases/download/{{ kubevirt_release }}/kubevirt-operator.yaml"
- "https://github.com/kubevirt/kubevirt/releases/download/{{ kubevirt_release }}/kubevirt-cr.yaml"

- name: Read kubevirt Deployment
k8s_info:
kind: Deployment
namespace: kubevirt
always:
- name: Delete existing namespace
kubernetes.core.k8s:
kind: namespace
namespace: kubevirt
state: absent
wait: true
ignore_errors: true

0 comments on commit 150448c

Please sign in to comment.