mirror of https://github.com/ansible/ansible.git
K8s retry merge (#44821)
* Make merge_type a list and apply merge_type in order Allow use case of preferring strategic-merge and failing back to merge, or just preferring a different merge type * Improve k8s module test coveragepull/26404/head
parent
ac3781d40b
commit
ce110ff081
@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: certmanager.k8s.io/v1alpha1
|
||||||
|
kind: Certificate
|
||||||
|
metadata:
|
||||||
|
name: acme-crt
|
||||||
|
spec:
|
||||||
|
secretName: acme-crt-secret
|
||||||
|
dnsNames:
|
||||||
|
- foo.example.com
|
||||||
|
- bar.example.com
|
||||||
|
acme:
|
||||||
|
config:
|
||||||
|
- ingressClass: nginx
|
||||||
|
domains:
|
||||||
|
- foo.example.com
|
||||||
|
- bar.example.com
|
||||||
|
issuerRef:
|
||||||
|
name: letsencrypt-prod
|
||||||
|
# We can reference ClusterIssuers by changing the kind here.
|
||||||
|
# The default value is Issuer (i.e. a locally namespaced Issuer)
|
||||||
|
kind: Issuer
|
@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: apiextensions.k8s.io/v1beta1
|
||||||
|
kind: CustomResourceDefinition
|
||||||
|
metadata:
|
||||||
|
name: certificates.certmanager.k8s.io
|
||||||
|
spec:
|
||||||
|
group: certmanager.k8s.io
|
||||||
|
version: v1alpha1
|
||||||
|
scope: Namespaced
|
||||||
|
names:
|
||||||
|
kind: Certificate
|
||||||
|
plural: certificates
|
||||||
|
shortNames:
|
||||||
|
- cert
|
||||||
|
- certs
|
@ -1,292 +1,402 @@
|
|||||||
# TODO: This is the only way I could get the kubeconfig, I don't know why. Running the lookup outside of debug seems to return an empty string
|
# TODO: This is the only way I could get the kubeconfig, I don't know why. Running the lookup outside of debug seems to return an empty string
|
||||||
- debug: msg={{ lookup('env', 'K8S_AUTH_KUBECONFIG') }}
|
#- debug: msg={{ lookup('env', 'K8S_AUTH_KUBECONFIG') }}
|
||||||
register: kubeconfig
|
# register: kubeconfig
|
||||||
|
|
||||||
# Kubernetes resources
|
# Kubernetes resources
|
||||||
- name: Create a namespace
|
|
||||||
k8s:
|
- block:
|
||||||
name: testing
|
- name: Create a namespace
|
||||||
kind: namespace
|
k8s:
|
||||||
register: output
|
name: testing
|
||||||
|
kind: namespace
|
||||||
- debug: msg={{ lookup("k8s", kind="Namespace", api_version="v1", resource_name='testing', kubeconfig=kubeconfig.msg) }}
|
register: output
|
||||||
|
|
||||||
- name: show output
|
- name: show output
|
||||||
debug:
|
debug:
|
||||||
var: output
|
var: output
|
||||||
|
|
||||||
- name: Create a service
|
- name: Create a service
|
||||||
k8s:
|
k8s:
|
||||||
state: present
|
state: present
|
||||||
resource_definition: &svc
|
resource_definition: &svc
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
|
||||||
name: web
|
|
||||||
namespace: testing
|
|
||||||
labels:
|
|
||||||
app: galaxy
|
|
||||||
service: web
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
app: galaxy
|
|
||||||
service: web
|
|
||||||
ports:
|
|
||||||
- protocol: TCP
|
|
||||||
targetPort: 8000
|
|
||||||
name: port-8000-tcp
|
|
||||||
port: 8000
|
|
||||||
register: output
|
|
||||||
|
|
||||||
- name: show output
|
|
||||||
debug:
|
|
||||||
var: output
|
|
||||||
|
|
||||||
- name: Create the service again
|
|
||||||
k8s:
|
|
||||||
state: present
|
|
||||||
resource_definition: *svc
|
|
||||||
register: output
|
|
||||||
|
|
||||||
- name: Service creation should be idempotent
|
|
||||||
assert:
|
|
||||||
that: not output.changed
|
|
||||||
|
|
||||||
- name: Create PVC
|
|
||||||
k8s:
|
|
||||||
state: present
|
|
||||||
inline: &pvc
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: elastic-volume
|
|
||||||
namespace: testing
|
|
||||||
spec:
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 5Gi
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
|
|
||||||
- name: Show output
|
|
||||||
debug:
|
|
||||||
var: output
|
|
||||||
|
|
||||||
- name: Create the PVC again
|
|
||||||
k8s:
|
|
||||||
state: present
|
|
||||||
inline: *pvc
|
|
||||||
|
|
||||||
- name: PVC creation should be idempotent
|
|
||||||
assert:
|
|
||||||
that: not output.changed
|
|
||||||
|
|
||||||
- name: Create deployment
|
|
||||||
k8s:
|
|
||||||
state: present
|
|
||||||
inline: &deployment
|
|
||||||
apiVersion: apps/v1beta1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: elastic
|
|
||||||
labels:
|
|
||||||
app: galaxy
|
|
||||||
service: elastic
|
|
||||||
namespace: testing
|
|
||||||
spec:
|
|
||||||
template:
|
|
||||||
metadata:
|
metadata:
|
||||||
|
name: web
|
||||||
|
namespace: testing
|
||||||
|
labels:
|
||||||
|
app: galaxy
|
||||||
|
service: web
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: galaxy
|
||||||
|
service: web
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
targetPort: 8000
|
||||||
|
name: port-8000-tcp
|
||||||
|
port: 8000
|
||||||
|
register: output
|
||||||
|
|
||||||
|
- name: show output
|
||||||
|
debug:
|
||||||
|
var: output
|
||||||
|
|
||||||
|
- name: Create the service again
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
resource_definition: *svc
|
||||||
|
register: output
|
||||||
|
|
||||||
|
- name: Service creation should be idempotent
|
||||||
|
assert:
|
||||||
|
that: not output.changed
|
||||||
|
|
||||||
|
- name: Create PVC
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
inline: &pvc
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: elastic-volume
|
||||||
|
namespace: testing
|
||||||
|
spec:
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 5Gi
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
|
||||||
|
- name: Show output
|
||||||
|
debug:
|
||||||
|
var: output
|
||||||
|
|
||||||
|
- name: Create the PVC again
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
inline: *pvc
|
||||||
|
|
||||||
|
- name: PVC creation should be idempotent
|
||||||
|
assert:
|
||||||
|
that: not output.changed
|
||||||
|
|
||||||
|
- name: Create deployment
|
||||||
|
k8s:
|
||||||
|
state: present
|
||||||
|
inline: &deployment
|
||||||
|
apiVersion: apps/v1beta1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: elastic
|
||||||
labels:
|
labels:
|
||||||
app: galaxy
|
app: galaxy
|
||||||
service: elastic
|
service: elastic
|
||||||
|
namespace: testing
|
||||||
spec:
|
spec:
|
||||||
containers:
|
template:
|
||||||
- name: elastic
|
metadata:
|
||||||
volumeMounts:
|
labels:
|
||||||
- mountPath: /usr/share/elasticsearch/data
|
app: galaxy
|
||||||
name: elastic-volume
|
service: elastic
|
||||||
command: ['elasticsearch']
|
spec:
|
||||||
image: 'ansible/galaxy-elasticsearch:2.4.6'
|
containers:
|
||||||
volumes:
|
- name: elastic
|
||||||
- name: elastic-volume
|
volumeMounts:
|
||||||
persistentVolumeClaim:
|
- mountPath: /usr/share/elasticsearch/data
|
||||||
claimName: elastic-volume
|
name: elastic-volume
|
||||||
replicas: 1
|
command: ['elasticsearch']
|
||||||
strategy:
|
image: 'ansible/galaxy-elasticsearch:2.4.6'
|
||||||
type: RollingUpdate
|
volumes:
|
||||||
register: output
|
- name: elastic-volume
|
||||||
|
persistentVolumeClaim:
|
||||||
- name: Show output
|
claimName: elastic-volume
|
||||||
debug:
|
replicas: 1
|
||||||
var: output
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
- name: Create deployment again
|
register: output
|
||||||
k8s:
|
|
||||||
state: present
|
- name: Show output
|
||||||
inline: *deployment
|
debug:
|
||||||
register: output
|
var: output
|
||||||
|
|
||||||
- name: Deployment creation should be idempotent
|
- name: Create deployment again
|
||||||
assert:
|
k8s:
|
||||||
that: not output.changed
|
state: present
|
||||||
|
inline: *deployment
|
||||||
# OpenShift Resources
|
register: output
|
||||||
- name: Create a project
|
|
||||||
k8s:
|
- name: Deployment creation should be idempotent
|
||||||
name: testing
|
assert:
|
||||||
kind: project
|
that: not output.changed
|
||||||
api_version: v1
|
|
||||||
register: output
|
# OpenShift Resources
|
||||||
|
- name: Create a project
|
||||||
- name: show output
|
k8s:
|
||||||
debug:
|
name: testing
|
||||||
var: output
|
kind: project
|
||||||
|
api_version: v1
|
||||||
- name: Create deployment config
|
register: output
|
||||||
k8s:
|
|
||||||
state: present
|
- name: show output
|
||||||
inline: &dc
|
debug:
|
||||||
apiVersion: v1
|
var: output
|
||||||
kind: DeploymentConfig
|
|
||||||
metadata:
|
- name: Create deployment config
|
||||||
name: elastic
|
k8s:
|
||||||
labels:
|
state: present
|
||||||
app: galaxy
|
inline: &dc
|
||||||
service: elastic
|
apiVersion: v1
|
||||||
namespace: testing
|
kind: DeploymentConfig
|
||||||
spec:
|
|
||||||
template:
|
|
||||||
metadata:
|
metadata:
|
||||||
|
name: elastic
|
||||||
labels:
|
labels:
|
||||||
app: galaxy
|
app: galaxy
|
||||||
service: elastic
|
service: elastic
|
||||||
|
namespace: testing
|
||||||
spec:
|
spec:
|
||||||
containers:
|
template:
|
||||||
- name: elastic
|
metadata:
|
||||||
volumeMounts:
|
labels:
|
||||||
- mountPath: /usr/share/elasticsearch/data
|
app: galaxy
|
||||||
name: elastic-volume
|
service: elastic
|
||||||
command: ['elasticsearch']
|
spec:
|
||||||
image: 'ansible/galaxy-elasticsearch:2.4.6'
|
containers:
|
||||||
volumes:
|
- name: elastic
|
||||||
- name: elastic-volume
|
volumeMounts:
|
||||||
persistentVolumeClaim:
|
- mountPath: /usr/share/elasticsearch/data
|
||||||
claimName: elastic-volume
|
name: elastic-volume
|
||||||
replicas: 1
|
command: ['elasticsearch']
|
||||||
strategy:
|
image: 'ansible/galaxy-elasticsearch:2.4.6'
|
||||||
type: Rolling
|
volumes:
|
||||||
register: output
|
- name: elastic-volume
|
||||||
|
persistentVolumeClaim:
|
||||||
- name: Show output
|
claimName: elastic-volume
|
||||||
debug:
|
replicas: 1
|
||||||
var: output
|
strategy:
|
||||||
|
type: Rolling
|
||||||
- name: Create deployment config again
|
register: output
|
||||||
k8s:
|
|
||||||
state: present
|
- name: Show output
|
||||||
inline: *dc
|
debug:
|
||||||
register: output
|
var: output
|
||||||
|
|
||||||
- name: DC creation should be idempotent
|
- name: Create deployment config again
|
||||||
assert:
|
k8s:
|
||||||
that: not output.changed
|
state: present
|
||||||
|
inline: *dc
|
||||||
### Type tests
|
register: output
|
||||||
- name: Create a namespace from a string
|
|
||||||
k8s:
|
- name: DC creation should be idempotent
|
||||||
definition: |+
|
assert:
|
||||||
---
|
that: not output.changed
|
||||||
kind: Namespace
|
|
||||||
apiVersion: v1
|
### Type tests
|
||||||
metadata:
|
- name: Create a namespace from a string
|
||||||
|
k8s:
|
||||||
|
definition: |+
|
||||||
|
---
|
||||||
|
kind: Namespace
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: testing1
|
||||||
|
|
||||||
|
- name: Namespace should exist
|
||||||
|
k8s_facts:
|
||||||
|
kind: Namespace
|
||||||
|
api_version: v1
|
||||||
name: testing1
|
name: testing1
|
||||||
|
register: k8s_facts_testing1
|
||||||
|
failed_when: not k8s_facts_testing1.resources or k8s_facts_testing1.resources[0].status.phase != "Active"
|
||||||
|
|
||||||
|
- name: Create resources from a multidocument yaml string
|
||||||
|
k8s:
|
||||||
|
definition: |+
|
||||||
|
---
|
||||||
|
kind: Namespace
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: testing2
|
||||||
|
---
|
||||||
|
kind: Namespace
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: testing3
|
||||||
|
|
||||||
|
- name: Lookup namespaces
|
||||||
|
k8s_facts:
|
||||||
|
api_version: v1
|
||||||
|
kind: Namespace
|
||||||
|
name: "{{ item }}"
|
||||||
|
loop:
|
||||||
|
- testing2
|
||||||
|
- testing3
|
||||||
|
register: k8s_namespaces
|
||||||
|
|
||||||
|
- name: Resources should exist
|
||||||
|
assert:
|
||||||
|
that: item.resources[0].status.phase == 'Active'
|
||||||
|
loop: "{{ k8s_namespaces.results }}"
|
||||||
|
|
||||||
|
- name: Delete resources from a multidocument yaml string
|
||||||
|
k8s:
|
||||||
|
state: absent
|
||||||
|
definition: |+
|
||||||
|
---
|
||||||
|
kind: Namespace
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: testing2
|
||||||
|
---
|
||||||
|
kind: Namespace
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: testing3
|
||||||
|
|
||||||
|
- name: Lookup namespaces
|
||||||
|
k8s_facts:
|
||||||
|
api_version: v1
|
||||||
|
kind: Namespace
|
||||||
|
name: "{{ item }}"
|
||||||
|
loop:
|
||||||
|
- testing2
|
||||||
|
- testing3
|
||||||
|
register: k8s_namespaces
|
||||||
|
|
||||||
|
- name: Resources should not exist
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- not item.resources or item.resources[0].status.phase == "Terminating"
|
||||||
|
loop: "{{ k8s_namespaces.results }}"
|
||||||
|
|
||||||
|
- name: Create resources from a list
|
||||||
|
k8s:
|
||||||
|
definition:
|
||||||
|
- kind: Namespace
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: testing4
|
||||||
|
- kind: Namespace
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: testing5
|
||||||
|
|
||||||
|
- name: Lookup namespaces
|
||||||
|
k8s_facts:
|
||||||
|
api_version: v1
|
||||||
|
kind: Namespace
|
||||||
|
name: "{{ item }}"
|
||||||
|
loop:
|
||||||
|
- testing4
|
||||||
|
- testing5
|
||||||
|
register: k8s_namespaces
|
||||||
|
|
||||||
|
- name: Resources should exist
|
||||||
|
assert:
|
||||||
|
that: item.resources[0].status.phase == 'Active'
|
||||||
|
loop: "{{ k8s_namespaces.results }}"
|
||||||
|
|
||||||
|
- name: install custom resource definitions
|
||||||
|
k8s:
|
||||||
|
definition: "{{ lookup('file', role_path + '/files/setup-crd.yml') }}"
|
||||||
|
|
||||||
|
- name: create custom resource definition
|
||||||
|
k8s:
|
||||||
|
definition: "{{ lookup('file', role_path + '/files/crd-resource.yml') }}"
|
||||||
|
namespace: testing4
|
||||||
|
register: create_crd
|
||||||
|
|
||||||
|
- name: recreate custom resource definition
|
||||||
|
k8s:
|
||||||
|
definition: "{{ lookup('file', role_path + '/files/crd-resource.yml') }}"
|
||||||
|
namespace: testing4
|
||||||
|
register: recreate_crd
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
|
- name: assert that recreating crd fails
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- recreate_crd is failed
|
||||||
|
|
||||||
|
- name: recreate custom resource definition with merge_type
|
||||||
|
k8s:
|
||||||
|
definition: "{{ lookup('file', role_path + '/files/crd-resource.yml') }}"
|
||||||
|
merge_type: merge
|
||||||
|
namespace: testing4
|
||||||
|
register: recreate_crd_with_merge
|
||||||
|
|
||||||
|
- name: recreate custom resource definition with merge_type list
|
||||||
|
k8s:
|
||||||
|
definition: "{{ lookup('file', role_path + '/files/crd-resource.yml') }}"
|
||||||
|
merge_type:
|
||||||
|
- strategic-merge
|
||||||
|
- merge
|
||||||
|
namespace: testing4
|
||||||
|
register: recreate_crd_with_merge_list
|
||||||
|
|
||||||
|
- name: remove crd
|
||||||
|
k8s:
|
||||||
|
definition: "{{ lookup('file', role_path + '/files/crd-resource.yml') }}"
|
||||||
|
namespace: testing4
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: Delete resources from a list
|
||||||
|
k8s:
|
||||||
|
state: absent
|
||||||
|
definition:
|
||||||
|
- kind: Namespace
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: testing4
|
||||||
|
- kind: Namespace
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: testing5
|
||||||
|
|
||||||
|
- k8s_facts:
|
||||||
|
api_version: v1
|
||||||
|
kind: Namespace
|
||||||
|
name: "{{ item }}"
|
||||||
|
loop:
|
||||||
|
- testing4
|
||||||
|
- testing5
|
||||||
|
register: k8s_facts
|
||||||
|
|
||||||
|
- name: Resources are terminating if still in results
|
||||||
|
assert:
|
||||||
|
that: not item.resources or item.resources[0].status.phase == "Terminating"
|
||||||
|
loop: "{{ k8s_facts.results }}"
|
||||||
|
|
||||||
|
always:
|
||||||
|
- name: remove crd
|
||||||
|
k8s:
|
||||||
|
definition: "{{ lookup('file', role_path + '/files/crd-resource.yml') }}"
|
||||||
|
namespace: testing4
|
||||||
|
state: absent
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
- name: Namespace should exist
|
- name: Delete all namespaces
|
||||||
assert:
|
k8s:
|
||||||
that: '{{ lookup("k8s", kind="Namespace", api_version="v1", resource_name="testing1", kubeconfig=kubeconfig.msg).status.phase == "Active" }}'
|
state: absent
|
||||||
|
definition:
|
||||||
- name: Create resources from a multidocument yaml string
|
- kind: Namespace
|
||||||
k8s:
|
apiVersion: v1
|
||||||
definition: |+
|
metadata:
|
||||||
---
|
name: testing1
|
||||||
kind: Namespace
|
- kind: Namespace
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
metadata:
|
metadata:
|
||||||
name: testing2
|
name: testing2
|
||||||
---
|
- kind: Namespace
|
||||||
kind: Namespace
|
apiVersion: v1
|
||||||
apiVersion: v1
|
metadata:
|
||||||
metadata:
|
name: testing3
|
||||||
name: testing3
|
- kind: Namespace
|
||||||
|
apiVersion: v1
|
||||||
- name: Resources should exist
|
metadata:
|
||||||
assert:
|
name: testing4
|
||||||
that: lookup("k8s", kind="Namespace", api_version="v1", resource_name=item, kubeconfig=kubeconfig.msg).status.phase == "Active"
|
- kind: Namespace
|
||||||
loop:
|
apiVersion: v1
|
||||||
- testing2
|
metadata:
|
||||||
- testing3
|
name: testing5
|
||||||
|
ignore_errors: yes
|
||||||
- name: Delete resources from a multidocument yaml string
|
|
||||||
k8s:
|
|
||||||
state: absent
|
|
||||||
definition: |+
|
|
||||||
---
|
|
||||||
kind: Namespace
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: testing2
|
|
||||||
---
|
|
||||||
kind: Namespace
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: testing3
|
|
||||||
|
|
||||||
- name: Resources should not exist
|
|
||||||
assert:
|
|
||||||
that: not ns or ns.status.phase == "Terminating"
|
|
||||||
loop:
|
|
||||||
- testing2
|
|
||||||
- testing3
|
|
||||||
vars:
|
|
||||||
ns: '{{ lookup("k8s", kind="Namespace", api_version="v1", resource_name=item, kubeconfig=kubeconfig.msg) }}'
|
|
||||||
|
|
||||||
- name: Create resources from a list
|
|
||||||
k8s:
|
|
||||||
definition:
|
|
||||||
- kind: Namespace
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: testing4
|
|
||||||
- kind: Namespace
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: testing5
|
|
||||||
|
|
||||||
- name: Resources should exist
|
|
||||||
assert:
|
|
||||||
that: lookup("k8s", kind="Namespace", api_version="v1", resource_name=item, kubeconfig=kubeconfig.msg).status.phase == "Active"
|
|
||||||
loop:
|
|
||||||
- testing4
|
|
||||||
- testing5
|
|
||||||
|
|
||||||
- name: Delete resources from a list
|
|
||||||
k8s:
|
|
||||||
state: absent
|
|
||||||
definition:
|
|
||||||
- kind: Namespace
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: testing4
|
|
||||||
- kind: Namespace
|
|
||||||
apiVersion: v1
|
|
||||||
metadata:
|
|
||||||
name: testing5
|
|
||||||
|
|
||||||
- name: Resources should not exist
|
|
||||||
assert:
|
|
||||||
that: not ns or ns.status.phase == "Terminating"
|
|
||||||
loop:
|
|
||||||
- testing4
|
|
||||||
- testing5
|
|
||||||
vars:
|
|
||||||
ns: '{{ lookup("k8s", kind="Namespace", api_version="v1", resource_name=item, kubeconfig=kubeconfig.msg) }}'
|
|
||||||
|
Loading…
Reference in New Issue