Browse Source
Merge pull request #2683 from rsmitty/custom-etcd-vars
support custom env vars for etcd
pull/2682/merge
Spencer Smith
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
10 additions and
0 deletions
-
roles/etcd/defaults/main.yml
-
roles/etcd/templates/etcd.env.j2
|
|
@ -31,6 +31,12 @@ etcd_election_timeout: "5000" |
|
|
|
|
|
|
|
etcd_metrics: "basic" |
|
|
|
|
|
|
|
## A dictionary of extra environment variables to add to etcd.env, formatted like: |
|
|
|
## etcd_extra_vars: |
|
|
|
## ETCD_VAR1: "value1" |
|
|
|
## ETCD_VAR2: "value2" |
|
|
|
etcd_extra_vars: {} |
|
|
|
|
|
|
|
# Limits |
|
|
|
# Limit memory only if <4GB memory on host. 0=unlimited |
|
|
|
etcd_memory_limit: "{% if ansible_memtotal_mb < 4096 %}512M{% else %}0{% endif %}" |
|
|
|
|
|
@ -27,3 +27,7 @@ ETCD_PEER_TRUSTED_CA_FILE={{ etcd_cert_dir }}/ca.pem |
|
|
|
ETCD_PEER_CERT_FILE={{ etcd_cert_dir }}/member-{{ inventory_hostname }}.pem |
|
|
|
ETCD_PEER_KEY_FILE={{ etcd_cert_dir }}/member-{{ inventory_hostname }}-key.pem |
|
|
|
ETCD_PEER_CLIENT_CERT_AUTH={{ etcd_peer_client_auth }} |
|
|
|
|
|
|
|
{% for key, value in etcd_extra_vars.iteritems() %} |
|
|
|
{{ key }}={{ value }} |
|
|
|
{% endfor %} |