Skip to content

Commit e37d018

Browse files
authored
Create objects without waiting for molecule setup (#5679)
Signed-off-by: Austin Macdonald <[email protected]>
1 parent 04fb844 commit e37d018

File tree

2 files changed

+14
-0
lines changed
  • internal/plugins/ansible/v1/scaffolds/internal/templates/molecule/mdefault
  • testdata/ansible/memcached-operator/molecule/default

2 files changed

+14
-0
lines changed

internal/plugins/ansible/v1/scaffolds/internal/templates/molecule/mdefault/kustomize.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ const kustomizeTemplate = `---
4646
changed_when: false
4747
4848
- name: Set resources to {{ "{{ state }}" }}
49+
k8s:
50+
definition: '{{ "{{ item }}" }}'
51+
state: '{{ "{{ state }}" }}'
52+
wait: no
53+
loop: '{{ "{{ resources.stdout | from_yaml_all | list }}" }}'
54+
55+
- name: Wait for resources to get to {{ "{{ state }}" }}
4956
k8s:
5057
definition: '{{ "{{ item }}" }}'
5158
state: '{{ "{{ state }}" }}'

testdata/ansible/memcached-operator/molecule/default/kustomize.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
changed_when: false
99

1010
- name: Set resources to {{ state }}
11+
k8s:
12+
definition: '{{ item }}'
13+
state: '{{ state }}'
14+
wait: no
15+
loop: '{{ resources.stdout | from_yaml_all | list }}'
16+
17+
- name: Wait for resources to get to {{ state }}
1118
k8s:
1219
definition: '{{ item }}'
1320
state: '{{ state }}'

0 commit comments

Comments
 (0)