ansible-roles/redis/tasks/main.yml

34 lines
598 B
YAML

---
- name: Redis is installed.
apt:
name: redis-server
state: present
tags:
- redis
- packages
- name: Redis is configured.
template:
src: redis.conf.j2
dest: "{{ redis_conf_path }}"
mode: "0644"
notify: restart redis
tags:
- redis
- name: Redis is running and enabled on boot.
service:
name: "{{ redis_daemon }}"
enabled: yes
state: started
tags:
- redis
- name: Is Munin installed
stat:
path: /etc/munin/plugins
register: _munin_installed
- include: munin.yml
when: _munin_installed.stat.exists and _munin_installed.stat.isdir