Add consul bootstrap and move vault to an example

This commit is contained in:
IamTheFij 2022-07-21 20:15:11 -07:00
parent 47a74b6166
commit 842e656342
5 changed files with 17 additions and 4 deletions

View File

@ -541,10 +541,10 @@
"is_secret": false "is_secret": false
} }
], ],
"nomad/vault_hashi_vault_values.yml": [ "nomad/vault_hashi_vault_values.example.yml": [
{ {
"type": "Secret Keyword", "type": "Secret Keyword",
"filename": "nomad/vault_hashi_vault_values.yml", "filename": "nomad/vault_hashi_vault_values.example.yml",
"hashed_secret": "f2baa52d02ca888455ce47823f47bf372d5eecb3", "hashed_secret": "f2baa52d02ca888455ce47823f47bf372d5eecb3",
"is_verified": false, "is_verified": false,
"line_number": 8, "line_number": 8,
@ -552,7 +552,7 @@
}, },
{ {
"type": "Secret Keyword", "type": "Secret Keyword",
"filename": "nomad/vault_hashi_vault_values.yml", "filename": "nomad/vault_hashi_vault_values.example.yml",
"hashed_secret": "18960546905b75c869e7de63961dc185f9a0a7c9", "hashed_secret": "18960546905b75c869e7de63961dc185f9a0a7c9",
"is_verified": false, "is_verified": false,
"line_number": 10, "line_number": 10,
@ -560,5 +560,5 @@
} }
] ]
}, },
"generated_at": "2022-07-22T02:03:22Z" "generated_at": "2022-07-22T03:15:58Z"
} }

2
nomad/.gitignore vendored
View File

@ -4,3 +4,5 @@ vault-keys.json
nomad_bootstrap.json nomad_bootstrap.json
ca/ ca/
collections/ansible_collections/ 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 # TODO: propogate this through via Consul and Nomad templates rather than Terraform
value: dev.homelab 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 - name: Setup Vault cluster
hosts: vault_instances hosts: vault_instances