don't use jinja2 templating delimiters with "when" statements

This commit is contained in:
Jérémy Lecour 2018-05-18 09:44:25 +02:00 committed by Jérémy Lecour
parent ec535b036c
commit 50a1003f15
2 changed files with 9 additions and 3 deletions

View File

@ -13,7 +13,7 @@
name: vm.max_map_count
value: 262144
sysctl_file: /etc/sysctl.d/elasticsearch.conf
when: "{{ max_map_count|int < 262144 }}"
when: max_map_count | int < 262144
tags:
- config

View File

@ -66,11 +66,17 @@
option: env.password
value: '{{ redis_password }}'
notify: restart munin-node
when: "redis_password != '' and redis_password != None and {{munin_redis_blocs_in_config.stdout | int}} <= 1"
when:
- redis_password != ''
- redis_password != None
- (munin_redis_blocs_in_config.stdout | int) <= 1
tags: redis
- name: Warn if multiple instance in munin-plugins configuration
debug:
msg: "WARNING - It seems you have multiple redis sections in your munin-node configuration - Munin config NOT changed"
when: "redis_password != '' and redis_password != None and {{munin_redis_blocs_in_config.stdout | int}} > 1 "
when:
- redis_password != ''
- redis_password != None
- (munin_redis_blocs_in_config.stdout | int) > 1