xoxys.redis/tasks/setup.yml

30 lines
678 B
YAML
Raw Normal View History

2021-06-01 19:32:28 +00:00
---
- block:
- name: Ensure dependencies are installed
package:
name: "{{ item }}"
state: present
loop: "{{ redis_packages_extra }}"
- name: Ensure Redis is installed
package:
name: "{{ item }}"
state: present
loop: "{{ redis_packages }}"
- name: Ensure Redis is configured
template:
src: etc/redis.conf.j2
dest: "{{ redis_conf_path }}"
mode: 0644
notify: __redis_restart
- name: Ensure Redis is up and running
service:
2021-06-01 19:32:28 +00:00
name: "{{ redis_daemon }}"
daemon_reload: yes
enabled: yes
state: started
become: True
become_user: root