1 import ./make-test-python.nix ({ pkgs, ... }: {
4 nodes.machine = { config, pkgs, ... }: {
5 services.vault-agent.instances.example.settings = {
6 vault.address = config.environment.variables.VAULT_ADDR;
11 config.token_file_path = pkgs.writeText "vault-token" config.environment.variables.VAULT_TOKEN;
17 {{- with secret "secret/example" }}
22 destination = "/example";
29 devRootTokenID = config.environment.variables.VAULT_TOKEN;
33 systemPackages = [ pkgs.vault ];
35 VAULT_ADDR = "http://localhost:8200";
42 machine.wait_for_unit("vault.service")
43 machine.wait_for_open_port(8200)
45 machine.wait_until_succeeds('vault kv put secret/example key=example')
47 machine.wait_for_unit("vault-agent-example.service")
49 machine.wait_for_file("/example")
50 machine.succeed('grep "example" /example')