From 669c3c656d4783e07ebd3f7fa4cf6853449ff305 Mon Sep 17 00:00:00 2001 From: Steve Kuznetsov Date: Thu, 13 Apr 2017 08:56:22 -0400 Subject: 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 --- roles/etcd/templates/etcd.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'roles/etcd') diff --git a/roles/etcd/templates/etcd.conf.j2 b/roles/etcd/templates/etcd.conf.j2 index 9151dd0bd..1b5598f46 100644 --- a/roles/etcd/templates/etcd.conf.j2 +++ b/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 %} -- cgit v1.2.1