Add consul bootstrap and move vault to an example

This commit is contained in:
IamTheFij 2022-07-21 20:15:11 -07:00
parent 5165045ee9
commit 5b88413604
4 changed files with 13 additions and 0 deletions

2
.gitignore vendored
View File

@ -4,3 +4,5 @@ vault-keys.json
nomad_bootstrap.json
ca/
collections/ansible_collections/
consul_values.yml
vault_hashi_vault_values.yml

View File

@ -0,0 +1,4 @@
consul_values:
"blocky/whitelists/ads": |
- |
somedomain.com

View File

@ -77,6 +77,13 @@
# TODO: propogate this through via Consul and Nomad templates rather than Terraform
value: dev.homelab
- name: Write values
consul_kv:
host: "{{ inventory_hostname }}"
key: "{{ item.key }}"
value: "{{ item.value }}"
loop: "{{ consul_values | default({}) | dict2items }}"
- name: Setup Vault cluster
hosts: vault_instances