2022-03-13 05:35:31 +00:00
|
|
|
# Deploy `Vault` server config:
|
|
|
|
template '/etc/vault.d/vault.hcl' do
|
|
|
|
owner 'vault'
|
|
|
|
group 'vault'
|
|
|
|
mode '644'
|
|
|
|
|
|
|
|
variables(HOSTNAME: node['vault']['hostname'], IPADDR: node['vault']['ipaddr'], IPS: node['vault']['ips'])
|
|
|
|
end
|
|
|
|
|
2022-03-13 12:16:08 +00:00
|
|
|
directory '/etc/vault.d/policies' do
|
|
|
|
owner 'vault'
|
|
|
|
group 'vault'
|
|
|
|
mode '755'
|
|
|
|
end
|
2022-03-13 12:34:14 +00:00
|
|
|
|
|
|
|
%w( consul-auto-config consul-connect-vault ).each do |conf|
|
|
|
|
remote_file "/etc/vault.d/policies/#{conf}.hcl" do
|
|
|
|
owner 'vault'
|
|
|
|
group 'vault'
|
|
|
|
mode '644'
|
|
|
|
end
|
|
|
|
end
|