Skip to content

Commit 131714f

Browse files
committed
Add idempotence tests for PKI
1 parent 08388d9 commit 131714f

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

tests/test_vault.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
vault_unseal_keys: "{{ vault_keys.keys_base64 }}"
3232

3333
- name: Configure PKI - create root/intermediate and generate certificates
34-
include_role:
35-
name: vault_pki
3634
vars:
3735
vault_pki_certificate_subject:
3836
- role: 'ServerCert'
@@ -68,10 +66,16 @@
6866
vault_pki_write_pem_bundle: false
6967
vault_pki_write_root_ca_to_file: true
7068
vault_token: "{{ vault_keys.root_token }}"
69+
block:
70+
- name: Configure PKI - create root/intermediate and generate certificates
71+
include_role:
72+
name: vault_pki
73+
74+
- name: Configure PKI - create root/intermediate and generate certificates (idempotence test)
75+
include_role:
76+
name: vault_pki
7177

7278
- name: Configure PKI - generate certificate pem bundle
73-
include_role:
74-
name: vault_pki
7579
vars:
7680
vault_pki_certificate_subject:
7781
- role: 'ServerCert'
@@ -89,6 +93,14 @@
8993
vault_pki_write_certificate_files: true
9094
vault_pki_write_pem_bundle: true
9195
vault_token: "{{ vault_keys.root_token }}"
96+
block:
97+
- name: Configure PKI - generate certificate pem bundle
98+
include_role:
99+
name: vault_pki
100+
101+
- name: Configure PKI - generate certificate pem bundle (idempotence test)
102+
include_role:
103+
name: vault_pki
92104

93105
- name: Validate if certificates exist
94106
stat:

0 commit comments

Comments
 (0)