Skip to content

Commit

Permalink
Merge pull request geerlingguy#51 from agrrh/master
Browse files Browse the repository at this point in the history
Fix geerlingguy#39: Redis won't start with ipv6 disabled
  • Loading branch information
geerlingguy authored Nov 17, 2020
2 parents 6f5f75b + faf4f72 commit 3bb1011
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
20 changes: 13 additions & 7 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@
redis_package: "{{ __redis_package }}"
when: redis_package is not defined

- name: Ensure Redis configuration dir exists.
file:
path: "{{ redis_conf_path | dirname }}"
state: directory
mode: 0755

- name: Ensure Redis is configured.
template:
src: redis.conf.j2
dest: "{{ redis_conf_path }}"
mode: "{{ redis_conf_mode }}"
notify: restart redis

# Setup/install tasks.
- include_tasks: setup-RedHat.yml
when: ansible_os_family == 'RedHat'
Expand All @@ -18,12 +31,5 @@
- include_tasks: setup-Archlinux.yml
when: ansible_os_family == 'Archlinux'

- name: Ensure Redis is configured.
template:
src: redis.conf.j2
dest: "{{ redis_conf_path }}"
mode: 0644
notify: restart redis

- name: Ensure Redis is running and enabled on boot.
service: "name={{ redis_daemon }} state=started enabled=yes"
1 change: 1 addition & 0 deletions vars/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
__redis_package: redis-server
redis_daemon: redis-server
redis_conf_path: /etc/redis/redis.conf
redis_conf_mode: 0640
1 change: 1 addition & 0 deletions vars/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
__redis_package: redis
redis_daemon: redis
redis_conf_path: /etc/redis.conf
redis_conf_mode: 0644

0 comments on commit 3bb1011

Please sign in to comment.