memcached: Fix conditions not properly writen (installation was always in multi-instance mode)

This commit is contained in:
Ludovic Poujol 2024-03-11 10:54:36 +01:00
parent ccff3b2105
commit aca146adbc
Signed by: lpoujol
SSH key fingerprint: SHA256:YZbQWfjHONnvIGkFZMs0xRKtqzqGqwtZU+kCOKhZXPA
4 changed files with 6 additions and 5 deletions

View file

@ -21,6 +21,7 @@ The **patch** part is incremented if multiple releases happen the same month
* certbot: Fix HAProxy renewal hook
* keepalived: Fix tasks that use file instead of copy
* memcached: Fix conditions not properly writen (installation was always in multi-instance mode)
### Removed

View file

@ -6,10 +6,10 @@
- memcached
- ansible.builtin.include: instance-default.yml
when: memcached_instance_name is undefined
when: memcached_instance_name | length == 0
- ansible.builtin.include: instance-multi.yml
when: memcached_instance_name is defined
when: memcached_instance_name | length > 0
- ansible.builtin.include: munin.yml

View file

@ -2,7 +2,7 @@
- name: Choose packages (Oracle)
ansible.builtin.set_fact:
multi: "multi_"
when: memcached_instance_name is defined
when: memcached_instance_name | length > 0
- name: is Munin present ?
ansible.builtin.stat:

View file

@ -36,7 +36,7 @@
regexp: '^command\[check_memcached\]='
line: 'command[check_memcached]=/usr/local/lib/nagios/plugins/check_memcached.pl -H 127.0.0.1 -p {{ memcached_port }}'
notify: restart nagios-nrpe-server
when: memcached_instance_name is undefined
when: memcached_instance_name | length == 0
- name: Add NRPE check (multi instance)
ansible.builtin.lineinfile:
@ -44,6 +44,6 @@
regexp: '^command\[check_memcached\]='
line: 'command[check_memcached]=/usr/local/lib/nagios/plugins/check_memcached_instances'
notify: restart nagios-nrpe-server
when: memcached_instance_name is defined
when: memcached_instance_name | length > 0
when: nrpe_evolix_config.stat.exists