redis: replace errorneous ini_file module for Munin config, fix dedicted Munin config filename (z-XXX)
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|2597|7|2590|8|:+1:
Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/302//ansiblelint">Evolix » ansible-roles » unstable #302</a>
gitea/ansible-roles/pipeline/head This commit looks good
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|2597|7|2590|8|:+1:
Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/302//ansiblelint">Evolix » ansible-roles » unstable #302</a>
gitea/ansible-roles/pipeline/head This commit looks good
This commit is contained in:
parent
1a1d4265a7
commit
b6886384b9
|
@ -54,6 +54,7 @@ The **patch** part changes is incremented if multiple releases happen the same m
|
||||||
* nagios-nrpe: check\_ssl\_local now has an output that nrpe can understand when it isn't OK
|
* nagios-nrpe: check\_ssl\_local now has an output that nrpe can understand when it isn't OK
|
||||||
* nginx: set default server directive in default vhost
|
* nginx: set default server directive in default vhost
|
||||||
* opendkim: update apt cache before install
|
* opendkim: update apt cache before install
|
||||||
|
* redis: replace errorneous ini_file module for Munin config, fix dedicted Munin config filename (z-XXX).
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
|
|
@ -11,14 +11,6 @@
|
||||||
tags:
|
tags:
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
- name: Create plugin directory
|
|
||||||
ansible.builtin.file:
|
|
||||||
name: /usr/local/lib/munin/
|
|
||||||
state: directory
|
|
||||||
mode: "0755"
|
|
||||||
tags:
|
|
||||||
- redis
|
|
||||||
|
|
||||||
- name: Create plugin directory
|
- name: Create plugin directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
name: /usr/local/lib/munin/plugins/
|
name: /usr/local/lib/munin/plugins/
|
||||||
|
@ -63,20 +55,18 @@
|
||||||
changed_when: False
|
changed_when: False
|
||||||
check_mode: no
|
check_mode: no
|
||||||
|
|
||||||
- name: Add redis password for munin (if no more than 1 config block)
|
- name: Configure redis plugin for munin
|
||||||
community.general.ini_file:
|
ansible.builtin.template:
|
||||||
dest: /etc/munin/plugin-conf.d/munin-node
|
src: templates/munin-plugin-default.conf.j2
|
||||||
section: 'redis_*'
|
dest: '/etc/munin/plugin-conf.d/z-evolinux-redis'
|
||||||
option: env.password
|
mode: "0740"
|
||||||
value: '{{ redis_password }}'
|
|
||||||
notify: restart munin-node
|
|
||||||
when:
|
when:
|
||||||
- redis_password is not none
|
- redis_password is not none
|
||||||
- redis_password | length > 0
|
- redis_password | length > 0
|
||||||
- (munin_redis_blocs_in_config.stdout | int) <= 1
|
- (munin_redis_blocs_in_config.stdout | int) <= 1
|
||||||
|
notify: restart munin-node
|
||||||
tags: redis
|
tags: redis
|
||||||
|
|
||||||
|
|
||||||
- name: Warn if multiple instance in munin-plugins configuration
|
- name: Warn if multiple instance in munin-plugins configuration
|
||||||
ansible.builtin.debug:
|
ansible.builtin.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"
|
||||||
|
|
|
@ -11,14 +11,6 @@
|
||||||
tags:
|
tags:
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
- name: Create plugin directory
|
|
||||||
ansible.builtin.file:
|
|
||||||
name: /usr/local/lib/munin/
|
|
||||||
state: directory
|
|
||||||
mode: "0755"
|
|
||||||
tags:
|
|
||||||
- redis
|
|
||||||
|
|
||||||
- name: Create plugin directory
|
- name: Create plugin directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
name: /usr/local/lib/munin/plugins/
|
name: /usr/local/lib/munin/plugins/
|
||||||
|
@ -58,7 +50,7 @@
|
||||||
- name: Configure redis plugin for munin
|
- name: Configure redis plugin for munin
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: templates/munin-plugin-instances.conf.j2
|
src: templates/munin-plugin-instances.conf.j2
|
||||||
dest: '/etc/munin/plugin-conf.d/evolinux.redis_{{ redis_instance_name }}'
|
dest: '/etc/munin/plugin-conf.d/z-evolinux-redis_{{ redis_instance_name }}'
|
||||||
mode: "0740"
|
mode: "0740"
|
||||||
notify: restart munin-node
|
notify: restart munin-node
|
||||||
tags: redis
|
tags: redis
|
||||||
|
|
6
redis/templates/munin-plugin-default.conf.j2
Normal file
6
redis/templates/munin-plugin-default.conf.j2
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# Ansible managed
|
||||||
|
|
||||||
|
{% if redis_password %}
|
||||||
|
[redis_*]
|
||||||
|
env.password {{ redis_password | replace("#", "\#") }}
|
||||||
|
{% endif %}
|
Loading…
Reference in a new issue