Fix up vault ssl, fix up vault cert since it needs a bundled cert
This commit is contained in:
parent
b5d51f7e3f
commit
1559206ae4
8 changed files with 15 additions and 8 deletions
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
- hosts: vault_server
|
||||
serial: 1
|
||||
roles:
|
||||
- role: vault_server
|
||||
...
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
args:
|
||||
executable: /bin/bash
|
||||
environment:
|
||||
VAULT_ADDR: http://ivyking.minhas.io:8200
|
||||
VAULT_ADDR: http://vault.service.masked.name:8200
|
||||
VAULT_TOKEN: "{{ lookup('file', lookup('env', 'HOME') + '/.vault-token') }}"
|
||||
VAULT_FORMAT: json
|
||||
register: cert_data
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
args:
|
||||
executable: /usr/local/bin/bash
|
||||
environment:
|
||||
VAULT_ADDR: http://ivyking.minhas.io:8200
|
||||
VAULT_ADDR: http://vault.service.masked.name:8200
|
||||
VAULT_TOKEN: "{{ lookup('file', lookup('env', 'HOME') + '/.vault-token') }}"
|
||||
VAULT_FORMAT: json
|
||||
register: cert_data
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
args:
|
||||
executable: /usr/local/bin/bash
|
||||
environment:
|
||||
VAULT_ADDR: http://ivyking.minhas.io:8200
|
||||
VAULT_ADDR: http://vault.service.masked.name:8200
|
||||
VAULT_TOKEN: "{{ lookup('file', lookup('env', 'HOME') + '/.vault-token') }}"
|
||||
VAULT_FORMAT: json
|
||||
register: cert_data
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
args:
|
||||
executable: /bin/bash
|
||||
environment:
|
||||
VAULT_ADDR: http://ivyking.minhas.io:8200
|
||||
VAULT_ADDR: http://vault.service.masked.name:8200
|
||||
VAULT_TOKEN: "{{ lookup('file', lookup('env', 'HOME') + '/.vault-token') }}"
|
||||
VAULT_FORMAT: json
|
||||
register: cert_data
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
args:
|
||||
executable: /bin/bash
|
||||
environment:
|
||||
VAULT_ADDR: http://ivyking.minhas.io:8200
|
||||
VAULT_ADDR: http://vault.service.masked.name:8200
|
||||
VAULT_TOKEN: "{{ lookup('file', lookup('env', 'HOME') + '/.vault-token') }}"
|
||||
VAULT_FORMAT: json
|
||||
register: cert_data
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
args:
|
||||
executable: /bin/bash
|
||||
environment:
|
||||
VAULT_ADDR: http://ivyking.minhas.io:8200
|
||||
VAULT_ADDR: http://vault.service.masked.name:8200
|
||||
VAULT_TOKEN: "{{ lookup('file', lookup('env', 'HOME') + '/.vault-token') }}"
|
||||
VAULT_FORMAT: json
|
||||
register: cert_data
|
||||
|
@ -114,6 +114,12 @@
|
|||
mode: "0600"
|
||||
}
|
||||
|
||||
- name: append cacert to vault cert
|
||||
blockinfile:
|
||||
path: /etc/nomad.d/certs/nomad.pem
|
||||
block: |
|
||||
{{ vault_ca_cert_payload }}
|
||||
|
||||
- name: ensure nomad is started and enabled
|
||||
systemd:
|
||||
name: nomad
|
||||
|
|
|
@ -12,8 +12,8 @@ listener "tcp" {
|
|||
tls_key_file = "/etc/vault.d/certs/vault.key"
|
||||
}
|
||||
|
||||
api_address = "{{ ansible_default_ipv4.address }}:8200"
|
||||
cluster_address = "{{ ansible_default_ipv4.address }}:8201"
|
||||
api_addr = "https://{{ ansible_default_ipv4.address }}:8200"
|
||||
cluster_addr = "https://{{ ansible_default_ipv4.address }}:8201"
|
||||
|
||||
storage "consul" {
|
||||
address = "localhost:8500"
|
||||
|
|
Loading…
Reference in a new issue