Skip to content

Error: handler 'restart redis 6379' was not found #193

Closed
@alibo

Description

@alibo

Unfortunately, I get this error with Ansible 2.6.2:

TASK [DavidWittman.redis : create redis config file] **************************************************************
ERROR! The requested handler 'restart redis 6379' was not found in either the main handlers list nor in the listening handlers list

Here is the playbook:

---
- name: Configure Redis
  hosts: all
  remote_user: root
  vars:
    - redis_slaveof: 192.168.1.100 6379
    - redis_version: 4.0.10
    - redis_port: 6379
    - redis_maxclients: 10000
    - redis_tcp_backlog: 5000
    - redis_bind: 127.0.0.1
    - redis_save:
      - ""
  roles:
    - redis

It seems Ansible doesn't pass the variable redis_port to the handler, so it can't find the handler restart redis 6379:
https://github.com/DavidWittman/ansible-redis/blob/1.2.5/handlers/main.yml#L2

Is there any workaround for this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions