Skip to content

Commit 590888b

Browse files
committed
test: Stub away vault enterprise service
The Vault Enterprise binary doesn't start without a license, so we "fake" it. This should make those molecule tests more stable.
1 parent b2b3135 commit 590888b

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

molecule/prepare.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,25 @@
1717
ansible.builtin.pip:
1818
name: netaddr
1919
become: false
20+
21+
- name: Stub out vault enterprise service
22+
hosts: all
23+
tasks:
24+
- name: Prepare CI environment
25+
when:
26+
- "'enterprise' in lookup('env', 'MOLECULE_SCENARIO_DIRECTORY')"
27+
- ansible_service_mgr == "systemd"
28+
block:
29+
- name: Make sure dropin directory exists
30+
ansible.builtin.file:
31+
path: /etc/systemd/system/vault.service.d/
32+
state: directory
33+
mode: '0755'
34+
35+
- name: Write dropin file
36+
ansible.builtin.copy:
37+
dest: /etc/systemd/system/vault.service.d/fake-service.conf
38+
content: |
39+
[Service]
40+
ExecStart=/usr/bin/true
41+
ExecReload=/usr/bin/true

0 commit comments

Comments
 (0)