This is what is available:

tasks:
     - shell: foo {{ my_port }}
       notify:
           - "some handler {{ my_port }}"

handlers:
      - name: "some handler 22"
        shell: bar
      - name: "some handler 50"
        shell: baz







On Wed, Feb 12, 2014 at 12:43 PM, Jose Chavez <jose.chavez10...@gmail.com>wrote:

> Hi Michael,
>
> Could you give me an example of how I could accomplish this using
> parameterization? I basically just need to be able to have a role task call
> multiple notifications which in 1.4.1 was just one notify call to the same
> named handlers :) I tried specifying multiple notify's in the role task as
> well but it looks like only one is called there too.
>
>
> On Tuesday, February 11, 2014 12:26:31 PM UTC-8, Jose Chavez wrote:
>>
>> Hello Ansible devs,
>>
>> I seem to have hit a regression in Ansible 1.4.3. I have a very simple
>> ansible playbook with one role and a handler file that contains two
>> notification. The role calls notify against the name of the handlers (same
>> name for both) but only the first handler is called. In Ansible 1.4.1 all
>> handlers with the same name would be called. Could this be a bug?
>>
>> Simple ansible playbook contents below:
>>
>> playbook file: test_handler_problem.yml
>> ---
>> - hosts: test-servers
>>   roles:
>>     - echo_msg
>>   tags:
>>     - test
>>
>> role: echo_msg
>>      with tasks main.yml file contents:
>>        ---
>>
>>        - name: echo_msg | Display message
>>          debug: msg="running test to show handler problem"
>>          changed_when: true
>>          notify: show handler problem
>>
>>     with handlers main.yml contents:
>>       ---
>>       # Test handlers with same name 1
>>       - name: show handler problem
>>       debug: msg="Handler 1 called"
>>
>>       # Test handlers with same name 2
>>       - name: show handler problem
>>       debug: msg="Handler 2 called"
>>
>> When I execute the playbook I get the following output:
>>
>> PLAY [test-servers] ******************************
>> *****************************
>>
>> GATHERING FACTS ******************************
>> *********************************
>> ok: [xxx.xx.xxx.xxx]
>>
>> TASK: [echo_msg | echo_msg | Display message]
>> *********************************
>> changed: [xxx.xx.xxx.xxx] => {
>>     "changed": true,
>>     "item": "",
>>     "msg": "running test to show handler problem"
>> }
>>
>> NOTIFIED: [echo_msg | show handler problem] ******************************
>> *****
>> ok: [xxx.xx.xxx.xxx] => {
>>     "item": "",
>>     "msg": "Handler 1 called"
>> }
>>
>> PLAY RECAP ************************************************************
>> ********
>> xxx.xx.xxx.xxx             : ok=3    changed=1    unreachable=0
>>  failed=0
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to