forked from evolix/ansible-roles
[Cleanup] redis
Space before and after variable names, comparison with empty strings and naming two tasks
This commit is contained in:
parent
9e0202d3de
commit
082e02fe6f
|
@ -39,7 +39,7 @@
|
||||||
- name: Enable redis munin plugin
|
- name: Enable redis munin plugin
|
||||||
file:
|
file:
|
||||||
src: /usr/local/share/munin/plugins/redis_
|
src: /usr/local/share/munin/plugins/redis_
|
||||||
dest: "/etc/munin/plugins/redis_{{item}}"
|
dest: "/etc/munin/plugins/redis_{{ item }}"
|
||||||
state: link
|
state: link
|
||||||
with_items:
|
with_items:
|
||||||
- connected_clients
|
- connected_clients
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
value: '{{ redis_password }}'
|
value: '{{ redis_password }}'
|
||||||
notify: restart munin-node
|
notify: restart munin-node
|
||||||
when:
|
when:
|
||||||
- redis_password != ''
|
- redis_password
|
||||||
- redis_password != None
|
- redis_password != None
|
||||||
- (munin_redis_blocs_in_config.stdout | int) <= 1
|
- (munin_redis_blocs_in_config.stdout | int) <= 1
|
||||||
tags: redis
|
tags: redis
|
||||||
|
@ -77,6 +77,6 @@
|
||||||
debug:
|
debug:
|
||||||
msg: "WARNING - It seems you have multiple redis sections in your munin-node configuration - Munin config NOT changed"
|
msg: "WARNING - It seems you have multiple redis sections in your munin-node configuration - Munin config NOT changed"
|
||||||
when:
|
when:
|
||||||
- redis_password != ''
|
- redis_password
|
||||||
- redis_password != None
|
- redis_password != None
|
||||||
- (munin_redis_blocs_in_config.stdout | int) > 1
|
- (munin_redis_blocs_in_config.stdout | int) > 1
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
- name: Enable redis munin plugin
|
- name: Enable redis munin plugin
|
||||||
file:
|
file:
|
||||||
src: /usr/local/share/munin/plugins/redis_
|
src: /usr/local/share/munin/plugins/redis_
|
||||||
dest: "/etc/munin/plugins/{{ redis_instance_name }}_redis_{{item}}"
|
dest: "/etc/munin/plugins/{{ redis_instance_name }}_redis_{{ item }}"
|
||||||
state: link
|
state: link
|
||||||
with_items:
|
with_items:
|
||||||
- connected_clients
|
- connected_clients
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- set_fact:
|
- name: "Define if redis needs to restart or not"
|
||||||
|
set_fact:
|
||||||
redis_restart_handler_name: "{{ redis_restart_if_needed | ternary('restart redis', 'restart redis (noop)') }}"
|
redis_restart_handler_name: "{{ redis_restart_if_needed | ternary('restart redis', 'restart redis (noop)') }}"
|
||||||
|
|
||||||
- name: Redis is installed.
|
- name: Redis is installed.
|
||||||
|
@ -30,7 +31,8 @@
|
||||||
tags:
|
tags:
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
- set_fact:
|
- name: "Define which version of redis is installed"
|
||||||
|
set_fact:
|
||||||
redis_installed_version: "{{ _redis_installed_version.stdout }}"
|
redis_installed_version: "{{ _redis_installed_version.stdout }}"
|
||||||
check_mode: no
|
check_mode: no
|
||||||
tags:
|
tags:
|
||||||
|
|
Loading…
Reference in a new issue