You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

166 lines
5.2 KiB

  1. ---
  2. vault_bootstrap: false
  3. vault_deployment_type: docker
  4. vault_adduser_vars:
  5. comment: "Hashicorp Vault User"
  6. createhome: no
  7. name: vault
  8. shell: /sbin/nologin
  9. system: yes
  10. # This variables redefined in kubespray-defaults for using shared tasks
  11. # in etcd and kubernetes/secrets roles
  12. vault_base_dir: /etc/vault
  13. vault_cert_dir: "{{ vault_base_dir }}/ssl"
  14. vault_config_dir: "{{ vault_base_dir }}/config"
  15. vault_roles_dir: "{{ vault_base_dir }}/roles"
  16. vault_secrets_dir: "{{ vault_base_dir }}/secrets"
  17. vault_log_dir: "/var/log/vault"
  18. vault_version: 0.8.1
  19. vault_binary_checksum: 3c4d70ba71619a43229e65c67830e30e050eab7a81ac6b28325ff707e5914188
  20. vault_download_url: "https://releases.hashicorp.com/vault/{{ vault_version }}/vault_{{ vault_version }}_linux_amd64.zip"
  21. vault_download_vars:
  22. container: "{{ vault_deployment_type != 'host' }}"
  23. dest: "vault/vault_{{ vault_version }}_linux_amd64.zip"
  24. enabled: true
  25. mode: "0755"
  26. owner: "vault"
  27. repo: "{{ vault_image_repo }}"
  28. sha256: "{{ vault_binary_checksum if vault_deployment_type == 'host' else vault_digest_checksum|d(none) }}"
  29. source_url: "{{ vault_download_url }}"
  30. tag: "{{ vault_image_tag }}"
  31. unarchive: true
  32. url: "{{ vault_download_url }}"
  33. version: "{{ vault_version }}"
  34. vault_container_name: kube-hashicorp-vault
  35. vault_temp_container_name: vault-temp
  36. vault_image_repo: "vault"
  37. vault_image_tag: "{{ vault_version }}"
  38. vault_bind_address: 0.0.0.0
  39. vault_port: 8200
  40. vault_etcd_url: "{{ etcd_access_addresses }}"
  41. # 8y default lease
  42. vault_default_lease_ttl: 70080h
  43. vault_max_lease_ttl: 87600h
  44. vault_temp_config:
  45. backend:
  46. file:
  47. path: /vault/file
  48. default_lease_ttl: "{{ vault_default_lease_ttl }}"
  49. listener:
  50. tcp:
  51. address: "{{ vault_bind_address }}:{{ vault_port }}"
  52. tls_disable: "true"
  53. max_lease_ttl: "{{ vault_max_lease_ttl }}"
  54. vault_config:
  55. backend:
  56. etcd:
  57. address: "{{ vault_etcd_url }}"
  58. ha_enabled: "true"
  59. redirect_addr: "https://{{ ansible_default_ipv4.address }}:{{ vault_port }}"
  60. tls_ca_file: "{{ vault_etcd_cert_dir }}/ca.pem"
  61. tls_cert_file: "{{ vault_etcd_cert_dir}}/node-{{ inventory_hostname }}.pem"
  62. tls_key_file: "{{ vault_etcd_cert_dir}}/node-{{ inventory_hostname }}-key.pem"
  63. cluster_name: "kubernetes-vault"
  64. default_lease_ttl: "{{ vault_default_lease_ttl }}"
  65. max_lease_ttl: "{{ vault_max_lease_ttl }}"
  66. listener:
  67. tcp:
  68. address: "{{ vault_bind_address }}:{{ vault_port }}"
  69. tls_cert_file: "{{ vault_cert_dir }}/api.pem"
  70. tls_key_file: "{{ vault_cert_dir }}/api-key.pem"
  71. vault_secret_shares: 1
  72. vault_secret_threshold: 1
  73. vault_ca_options:
  74. vault:
  75. common_name: vault
  76. format: pem
  77. ttl: "{{ vault_max_lease_ttl }}"
  78. exclude_cn_from_sans: true
  79. alt_names: "vault.{{ system_namespace }}.svc.{{ dns_domain }},vault.{{ system_namespace }}.svc,vault.{{ system_namespace }},vault"
  80. etcd:
  81. common_name: etcd
  82. format: pem
  83. ttl: "{{ vault_max_lease_ttl }}"
  84. exclude_cn_from_sans: true
  85. kube:
  86. common_name: kube
  87. format: pem
  88. ttl: "{{ vault_max_lease_ttl }}"
  89. exclude_cn_from_sans: true
  90. vault_client_headers:
  91. Accept: "application/json"
  92. Content-Type: "application/json"
  93. vault_etcd_cert_dir: /etc/ssl/etcd/ssl
  94. vault_kube_cert_dir: /etc/kubernetes/ssl
  95. vault_pki_mounts:
  96. vault:
  97. name: vault
  98. default_lease_ttl: "{{ vault_default_lease_ttl }}"
  99. max_lease_ttl: "{{ vault_max_lease_ttl }}"
  100. description: "Vault Root CA"
  101. cert_dir: "{{ vault_cert_dir }}"
  102. roles:
  103. - name: vault
  104. group: vault
  105. password: "{{ lookup('password', 'credentials/vault/vault length=15') }}"
  106. policy_rules: default
  107. role_options: default
  108. etcd:
  109. name: etcd
  110. default_lease_ttl: "{{ vault_default_lease_ttl }}"
  111. max_lease_ttl: "{{ vault_max_lease_ttl }}"
  112. description: "Etcd Root CA"
  113. cert_dir: "{{ vault_etcd_cert_dir }}"
  114. roles:
  115. - name: etcd
  116. group: etcd
  117. password: "{{ lookup('password', 'credentials/vault/etcd length=15') }}"
  118. policy_rules: default
  119. role_options:
  120. allow_any_name: true
  121. enforce_hostnames: false
  122. organization: "kube:etcd"
  123. kube:
  124. name: kube
  125. default_lease_ttl: "{{ vault_default_lease_ttl }}"
  126. max_lease_ttl: "{{ vault_max_lease_ttl }}"
  127. description: "Kubernetes Root CA"
  128. cert_dir: "{{ vault_kube_cert_dir }}"
  129. roles:
  130. - name: kube-master
  131. group: kube-master
  132. password: "{{ lookup('password', 'credentials/vault/kube-master length=15') }}"
  133. policy_rules: default
  134. role_options:
  135. allow_any_name: true
  136. enforce_hostnames: false
  137. organization: "system:masters"
  138. - name: kube-node
  139. group: k8s-cluster
  140. password: "{{ lookup('password', 'credentials/vault/kube-node length=15') }}"
  141. policy_rules: default
  142. role_options:
  143. allow_any_name: true
  144. enforce_hostnames: false
  145. organization: "system:nodes"
  146. - name: kube-proxy
  147. group: k8s-cluster
  148. password: "{{ lookup('password', 'credentials/vault/kube-proxy length=15') }}"
  149. policy_rules: default
  150. role_options:
  151. allow_any_name: true
  152. enforce_hostnames: false
  153. organization: "system:node-proxier"