passign arguments to the handler

18 views
Skip to first unread message

Pathangi Janardhanan

unread,
Apr 22, 2016, 5:47:15 PM4/22/16
to Ansible Project
Hi,

 I see many thread of discussion on this topic, but I am not able to find any resolution on this. I want to be able to pass parameters to my handler.

I am managing a set of Redis DB on a node, and if the configuration on any of them changes, I want to be able to restart that specific instance of Redis DB. In the main task I have a loop like this

- name: Setup the redis db config file for the DBs that we are slave node
  template:
    src: redis.slave.conf
    dest: "/etc/redis/redis.{{item.db_name}}.conf"
  with_items: "{{slave_db}}"
  become: yes
  notify:
    - restart redis_server

 The problem is even if one of the configurations have changed, or if a new DB is added, this results in restart of all the DB instances.

 I would like to do something like - restart redis_server <db_instance>

 is there any way to do something like that?

Thanks
jana

Brian Coca

unread,
Apr 22, 2016, 8:25:01 PM4/22/16
to ansible...@googlegroups.com
no


----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages