diff --git a/.gitignore b/.gitignore index 62bf69b..fb66e6b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ vault-keys.json nomad_bootstrap.json ca/ collections/ansible_collections/ +consul_values.yml +vault_hashi_vault_values.yml diff --git a/consul_values.example.yml b/consul_values.example.yml new file mode 100644 index 0000000..023dded --- /dev/null +++ b/consul_values.example.yml @@ -0,0 +1,4 @@ +consul_values: + "blocky/whitelists/ads": | + - | + somedomain.com diff --git a/setup-cluster.yml b/setup-cluster.yml index a5dab1a..613cc72 100644 --- a/setup-cluster.yml +++ b/setup-cluster.yml @@ -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 diff --git a/vault_hashi_vault_values.yml b/vault_hashi_vault_values.example.yml similarity index 100% rename from vault_hashi_vault_values.yml rename to vault_hashi_vault_values.example.yml