2017-01-13 20:31:10 +00:00
|
|
|
---
|
2017-09-01 19:51:37 +00:00
|
|
|
vault_bootstrap: false
|
|
|
|
vault_deployment_type: docker
|
2017-01-13 20:31:10 +00:00
|
|
|
|
2017-02-08 21:41:36 +00:00
|
|
|
vault_adduser_vars:
|
|
|
|
comment: "Hashicorp Vault User"
|
|
|
|
createhome: no
|
|
|
|
name: vault
|
|
|
|
shell: /sbin/nologin
|
|
|
|
system: yes
|
2017-09-01 19:51:37 +00:00
|
|
|
|
|
|
|
# This variables redefined in kubespray-defaults for using shared tasks
|
|
|
|
# in etcd and kubernetes/secrets roles
|
2017-02-08 21:41:36 +00:00
|
|
|
vault_base_dir: /etc/vault
|
|
|
|
vault_cert_dir: "{{ vault_base_dir }}/ssl"
|
|
|
|
vault_config_dir: "{{ vault_base_dir }}/config"
|
2017-09-01 19:51:37 +00:00
|
|
|
vault_roles_dir: "{{ vault_base_dir }}/roles"
|
|
|
|
vault_secrets_dir: "{{ vault_base_dir }}/secrets"
|
2018-05-11 16:11:38 +00:00
|
|
|
vault_lib_dir: "/var/lib/vault"
|
2017-09-01 19:51:37 +00:00
|
|
|
vault_log_dir: "/var/log/vault"
|
|
|
|
|
2018-05-11 16:11:38 +00:00
|
|
|
vault_version: 0.10.1
|
|
|
|
vault_binary_checksum: 66f0f1b0b221d664dd5913f8697409d7401df4bb2a19c7277e8fbad152063fae
|
2017-12-18 08:12:47 +00:00
|
|
|
vault_download_url: "https://releases.hashicorp.com/vault/{{ vault_version }}/vault_{{ vault_version }}_linux_{{ image_arch }}.zip"
|
|
|
|
|
|
|
|
# Arch of Docker images and needed packages
|
2018-08-23 14:47:18 +00:00
|
|
|
image_arch: "{{host_architecture}}"
|
2017-12-18 08:12:47 +00:00
|
|
|
|
2017-02-08 21:41:36 +00:00
|
|
|
vault_download_vars:
|
|
|
|
container: "{{ vault_deployment_type != 'host' }}"
|
2017-12-18 08:12:47 +00:00
|
|
|
dest: "vault/vault_{{ vault_version }}_linux_{{ image_arch }}.zip"
|
2017-02-08 21:41:36 +00:00
|
|
|
enabled: true
|
|
|
|
mode: "0755"
|
|
|
|
owner: "vault"
|
|
|
|
repo: "{{ vault_image_repo }}"
|
|
|
|
sha256: "{{ vault_binary_checksum if vault_deployment_type == 'host' else vault_digest_checksum|d(none) }}"
|
|
|
|
source_url: "{{ vault_download_url }}"
|
|
|
|
tag: "{{ vault_image_tag }}"
|
|
|
|
unarchive: true
|
|
|
|
url: "{{ vault_download_url }}"
|
|
|
|
version: "{{ vault_version }}"
|
2017-09-01 19:51:37 +00:00
|
|
|
|
|
|
|
vault_container_name: kube-hashicorp-vault
|
|
|
|
vault_temp_container_name: vault-temp
|
2017-02-08 21:41:36 +00:00
|
|
|
vault_image_repo: "vault"
|
|
|
|
vault_image_tag: "{{ vault_version }}"
|
2017-09-01 19:51:37 +00:00
|
|
|
|
2017-09-04 21:16:44 +00:00
|
|
|
vault_bind_address: 0.0.0.0
|
2017-01-13 20:31:10 +00:00
|
|
|
vault_port: 8200
|
2017-10-17 15:57:36 +00:00
|
|
|
vault_etcd_url: "{{ etcd_access_addresses }}"
|
2017-09-01 19:51:37 +00:00
|
|
|
|
2017-12-15 13:34:00 +00:00
|
|
|
# 8y default lease
|
|
|
|
vault_default_lease_ttl: 70080h
|
2017-09-01 19:51:37 +00:00
|
|
|
vault_max_lease_ttl: 87600h
|
|
|
|
|
2017-01-13 20:31:10 +00:00
|
|
|
vault_temp_config:
|
|
|
|
backend:
|
|
|
|
file:
|
|
|
|
path: /vault/file
|
2017-08-23 06:54:01 +00:00
|
|
|
default_lease_ttl: "{{ vault_default_lease_ttl }}"
|
2017-01-13 20:31:10 +00:00
|
|
|
listener:
|
|
|
|
tcp:
|
2017-09-04 21:16:44 +00:00
|
|
|
address: "{{ vault_bind_address }}:{{ vault_port }}"
|
2017-01-13 20:31:10 +00:00
|
|
|
tls_disable: "true"
|
2017-08-23 06:54:01 +00:00
|
|
|
max_lease_ttl: "{{ vault_max_lease_ttl }}"
|
2017-09-01 19:51:37 +00:00
|
|
|
|
|
|
|
vault_config:
|
|
|
|
backend:
|
|
|
|
etcd:
|
|
|
|
address: "{{ vault_etcd_url }}"
|
|
|
|
ha_enabled: "true"
|
2018-05-11 16:11:38 +00:00
|
|
|
redirect_addr: "https://{{ inventory_hostname }}:{{ vault_port }}"
|
|
|
|
tls_ca_file: "{{ etcd_cert_dir }}/ca.pem"
|
|
|
|
tls_cert_file: "{{ etcd_cert_dir}}/node-{{ inventory_hostname }}.pem"
|
|
|
|
tls_key_file: "{{ etcd_cert_dir}}/node-{{ inventory_hostname }}-key.pem"
|
2017-09-01 19:51:37 +00:00
|
|
|
cluster_name: "kubernetes-vault"
|
|
|
|
default_lease_ttl: "{{ vault_default_lease_ttl }}"
|
|
|
|
max_lease_ttl: "{{ vault_max_lease_ttl }}"
|
|
|
|
listener:
|
|
|
|
tcp:
|
2017-09-04 21:16:44 +00:00
|
|
|
address: "{{ vault_bind_address }}:{{ vault_port }}"
|
2017-09-01 19:51:37 +00:00
|
|
|
tls_cert_file: "{{ vault_cert_dir }}/api.pem"
|
|
|
|
tls_key_file: "{{ vault_cert_dir }}/api-key.pem"
|
|
|
|
|
|
|
|
vault_secret_shares: 1
|
|
|
|
vault_secret_threshold: 1
|
|
|
|
|
2018-05-11 16:11:38 +00:00
|
|
|
vault_successful_http_codes: ["200", "429", "500", "501", "503"]
|
|
|
|
|
2017-09-01 19:51:37 +00:00
|
|
|
vault_ca_options:
|
|
|
|
vault:
|
|
|
|
common_name: vault
|
|
|
|
format: pem
|
|
|
|
ttl: "{{ vault_max_lease_ttl }}"
|
|
|
|
exclude_cn_from_sans: true
|
2018-03-30 11:29:13 +00:00
|
|
|
alt_names: "vault.kube-system.svc.{{ dns_domain }},vault.kube-system.svc,vault.kube-system,vault"
|
2017-09-01 19:51:37 +00:00
|
|
|
etcd:
|
|
|
|
common_name: etcd
|
|
|
|
format: pem
|
|
|
|
ttl: "{{ vault_max_lease_ttl }}"
|
|
|
|
exclude_cn_from_sans: true
|
|
|
|
kube:
|
|
|
|
common_name: kube
|
|
|
|
format: pem
|
|
|
|
ttl: "{{ vault_max_lease_ttl }}"
|
|
|
|
exclude_cn_from_sans: true
|
|
|
|
|
|
|
|
vault_client_headers:
|
|
|
|
Accept: "application/json"
|
|
|
|
Content-Type: "application/json"
|
|
|
|
|
2018-05-11 16:11:38 +00:00
|
|
|
etcd_cert_dir: /etc/ssl/etcd/ssl
|
|
|
|
kube_cert_dir: /etc/kubernetes/ssl
|
2017-09-01 19:51:37 +00:00
|
|
|
|
|
|
|
vault_pki_mounts:
|
2018-05-11 16:11:38 +00:00
|
|
|
userpass:
|
|
|
|
name: userpass
|
|
|
|
default_lease_ttl: "{{ vault_default_lease_ttl }}"
|
|
|
|
max_lease_ttl: "{{ vault_max_lease_ttl }}"
|
|
|
|
description: "Userpass"
|
|
|
|
cert_dir: "{{ vault_cert_dir }}"
|
|
|
|
roles:
|
|
|
|
- name: userpass
|
|
|
|
group: userpass
|
|
|
|
password: "{{ lookup('password', inventory_dir + '/credentials/vault/userpass.creds length=15') }}"
|
|
|
|
policy_rules: default
|
|
|
|
role_options:
|
|
|
|
allow_any_name: true
|
|
|
|
|
2017-09-01 19:51:37 +00:00
|
|
|
vault:
|
|
|
|
name: vault
|
|
|
|
default_lease_ttl: "{{ vault_default_lease_ttl }}"
|
|
|
|
max_lease_ttl: "{{ vault_max_lease_ttl }}"
|
|
|
|
description: "Vault Root CA"
|
|
|
|
cert_dir: "{{ vault_cert_dir }}"
|
|
|
|
roles:
|
|
|
|
- name: vault
|
|
|
|
group: vault
|
2018-03-21 07:50:32 +00:00
|
|
|
password: "{{ lookup('password', inventory_dir + '/credentials/vault/vault.creds length=15') }}"
|
2017-09-01 19:51:37 +00:00
|
|
|
policy_rules: default
|
2018-05-11 16:11:38 +00:00
|
|
|
role_options:
|
|
|
|
allow_any_name: true
|
2017-09-01 19:51:37 +00:00
|
|
|
etcd:
|
|
|
|
name: etcd
|
|
|
|
default_lease_ttl: "{{ vault_default_lease_ttl }}"
|
|
|
|
max_lease_ttl: "{{ vault_max_lease_ttl }}"
|
|
|
|
description: "Etcd Root CA"
|
2018-05-11 16:11:38 +00:00
|
|
|
cert_dir: "{{ etcd_cert_dir }}"
|
2017-09-01 19:51:37 +00:00
|
|
|
roles:
|
|
|
|
- name: etcd
|
|
|
|
group: etcd
|
2018-03-21 07:50:32 +00:00
|
|
|
password: "{{ lookup('password', inventory_dir + '/credentials/vault/etcd.creds length=15') }}"
|
2017-09-01 19:51:37 +00:00
|
|
|
policy_rules: default
|
|
|
|
role_options:
|
|
|
|
allow_any_name: true
|
|
|
|
enforce_hostnames: false
|
|
|
|
organization: "kube:etcd"
|
|
|
|
kube:
|
|
|
|
name: kube
|
|
|
|
default_lease_ttl: "{{ vault_default_lease_ttl }}"
|
|
|
|
max_lease_ttl: "{{ vault_max_lease_ttl }}"
|
|
|
|
description: "Kubernetes Root CA"
|
2018-05-11 16:11:38 +00:00
|
|
|
cert_dir: "{{ kube_cert_dir }}"
|
2017-09-01 19:51:37 +00:00
|
|
|
roles:
|
|
|
|
- name: kube-master
|
|
|
|
group: kube-master
|
2018-03-21 07:50:32 +00:00
|
|
|
password: "{{ lookup('password', inventory_dir + '/credentials/vault/kube-master.creds length=15') }}"
|
2017-09-01 19:51:37 +00:00
|
|
|
policy_rules: default
|
|
|
|
role_options:
|
|
|
|
allow_any_name: true
|
|
|
|
enforce_hostnames: false
|
|
|
|
organization: "system:masters"
|
2018-05-11 16:11:38 +00:00
|
|
|
- name: front-proxy-client
|
|
|
|
group: kube-master
|
|
|
|
password: "{{ lookup('password', inventory_dir + '/credentials/vault/kube-proxy.creds length=15') }}"
|
|
|
|
policy_rules: default
|
|
|
|
role_options:
|
|
|
|
allow_any_name: true
|
|
|
|
enforce_hostnames: false
|
|
|
|
organization: "system:front-proxy-client"
|
2017-09-01 19:51:37 +00:00
|
|
|
- name: kube-node
|
|
|
|
group: k8s-cluster
|
2018-03-21 07:50:32 +00:00
|
|
|
password: "{{ lookup('password', inventory_dir + '/credentials/vault/kube-node.creds length=15') }}"
|
2017-09-01 19:51:37 +00:00
|
|
|
policy_rules: default
|
|
|
|
role_options:
|
|
|
|
allow_any_name: true
|
|
|
|
enforce_hostnames: false
|
|
|
|
organization: "system:nodes"
|
|
|
|
- name: kube-proxy
|
|
|
|
group: k8s-cluster
|
2018-03-21 07:50:32 +00:00
|
|
|
password: "{{ lookup('password', inventory_dir + '/credentials/vault/kube-proxy.creds length=15') }}"
|
2017-09-01 19:51:37 +00:00
|
|
|
policy_rules: default
|
|
|
|
role_options:
|
|
|
|
allow_any_name: true
|
|
|
|
enforce_hostnames: false
|
|
|
|
organization: "system:node-proxier"
|