Преглед на файлове

Cast etcd_debug to a boolean

In the current implementation, any user-provided string in the
`etcd_debug` variable will be placed into `etcd.conf`. The YAML
and Ansible boolean parsing is more generous than the Golang one,
so valid YAML booleans like `no` will be invalid when passed to
etcd. Casting to a boolean before casting to a string normalizes
the field.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
Steve Kuznetsov преди 8 години
родител
ревизия
669c3c656d
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      roles/etcd/templates/etcd.conf.j2

+ 1 - 1
roles/etcd/templates/etcd.conf.j2

@@ -62,7 +62,7 @@ ETCD_PEER_KEY_FILE={{ etcd_peer_key_file }}
 {% endif -%}
 
 #[logging]
-ETCD_DEBUG="{{ etcd_debug | default(false) | string }}"
+ETCD_DEBUG="{{ etcd_debug | default(false) | bool | string }}"
 {% if etcd_log_package_levels is defined %}
 ETCD_LOG_PACKAGE_LEVELS="{{ etcd_log_package_levels }}"
 {% endif %}