ansible-roles/redis/tasks/main.yml

46 lines
890 B
YAML
Raw Normal View History

2016-09-29 10:59:13 +02:00
---
- name: Redis is installed.
2016-09-29 10:59:13 +02:00
apt:
2017-09-27 17:57:02 +02:00
name: "{{ item }}"
state: present
2017-09-27 17:57:02 +02:00
with_items:
- redis-server
- redis-tools
tags:
- redis
- packages
2016-09-29 10:59:13 +02:00
- name: Redis is configured.
2016-09-29 10:59:13 +02:00
template:
src: redis.conf.j2
dest: "{{ redis_conf_path }}"
mode: "0644"
2016-09-29 10:59:13 +02:00
notify: restart redis
tags:
- redis
2016-09-29 10:59:13 +02:00
- name: Redis is running and enabled on boot.
2016-09-29 10:59:13 +02:00
service:
name: "{{ redis_daemon }}"
enabled: yes
state: started
tags:
- redis
2017-06-02 14:25:13 +02:00
- name: Is Munin installed
stat:
path: /etc/munin/plugins
register: _munin_installed
2017-06-02 14:25:13 +02:00
- include: munin.yml
2017-06-12 16:37:56 +02:00
when: _munin_installed.stat.exists and _munin_installed.stat.isdir
- name: is NRPE present ?
stat:
path: /etc/nagios/nrpe.d/evolix.cfg
check_mode: no
register: nrpe_evolix_config
- include: nrpe_stretch.yml
when: ansible_distribution_release == "stretch" and nrpe_evolix_config.stat.exists == true