Skip to content

Commit

Permalink
feat: Add raft backed support
Browse files Browse the repository at this point in the history
  • Loading branch information
securez authored and bbaassssiiee committed May 6, 2020
1 parent 23db41c commit 2334138
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ vault_main_configuration_template: vault_main_configuration.hcl.j2
vault_backend: consul
vault_backend_consul: vault_backend_consul.j2
vault_backend_file: vault_backend_file.j2
vault_backend_raft: vault_backend_raft.j2
vault_backend_etcd: vault_backend_etcd.j2
vault_backend_s3: vault_backend_s3.j2
vault_backend_dynamodb: vault_backend_dynamodb.j2
Expand All @@ -75,6 +76,8 @@ vault_cluster_address: "{{ hostvars[inventory_hostname]['ansible_'+vault_iface][
vault_cluster_addr: "{{ vault_protocol }}://{{ vault_cluster_address }}"
vault_api_addr: "{{ vault_protocol }}://{{ vault_redirect_address | default(hostvars[inventory_hostname]['ansible_'+vault_iface]['ipv4']['address']) }}:{{ vault_port }}"

vault_raft_node_id: "raft_node_1"

vault_max_lease_ttl: "768h"
vault_default_lease_ttl: "768h"

Expand Down
4 changes: 4 additions & 0 deletions templates/vault_backend_raft.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
storage "raft" {
path = "{{ vault_data_path }}"
node_id = "{{ vault_raft_node_id }}"
}
2 changes: 2 additions & 0 deletions templates/vault_main_configuration.hcl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ listener "tcp" {
{% include vault_backend_dynamodb with context -%}
{% elif vault_backend == 'mysql' -%}
{% include vault_backend_mysql with context -%}
{% elif vault_backend == 'raft' -%}
{% include vault_backend_raft with context -%}
{% endif %}

{% if vault_ui -%}
Expand Down

0 comments on commit 2334138

Please sign in to comment.