xoxys.redis/tasks/setup.yml
Robert Kaussow b91d2e7f7d
All checks were successful
continuous-integration/drone/push Build is passing
refactor: use generic ansible modules service and package
2021-06-05 15:30:40 +02:00

30 lines
678 B
YAML

---
- 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:
name: "{{ redis_daemon }}"
daemon_reload: yes
enabled: yes
state: started
become: True
become_user: root