Note: these tasks are in the same role.

On Thursday, May 28, 2015 at 6:05:35 PM UTC-7, Steven Truong wrote:
>
> Hi Matt,
>
> Here are some tasks that call the same notify and it happened that these 
> files might got changed during the same run.
>
> - name: creates hadoop .sh config files
>   template: src={{ item }}.j2 dest=/etc/hadoop/conf.{{ nameservice_id 
> }}/{{ item }} owner=hdfs group=hadoop mode=0755
>   with_items:
>   - hadoop-env.sh
>   - yarn-env.sh
>   tags:
>   - cdh5_datanode
>   - cdh5_datanode_conf
>   - cdh5_datanode_conf_sh
>   - cdh5_mrv1_slave
>   notify: reload datanode
>
> - name: create /etc/default/hadoop-hdfs-datanode
>   template: src=hadoop-hdfs-datanode.j2 
> dest=/etc/default/hadoop-hdfs-datanode owner=root group=root mode=0644
>   tags:
>   - cdh5_datanode
>   - cdh5_datanode_conf
>   - cdh5_mrv1_slave
>   notify: reload datanode
>
> Currently, I already finished my setup and I just do not have the outputs 
> around but please trust me on this one or you can simply experiment with 
> something similar to this situation.
>
> Thank you very much,
> Steven.
>
> On Thursday, May 28, 2015 at 5:10:03 PM UTC-7, Matt Martz wrote:
>>
>> I think you are going to need to show an example of the playbook/role and 
>> the output of this happening.
>>
>> On Thursday, May 28, 2015, Steven Truong <[email protected]> wrote:
>>
>>> Hi all,
>>>
>>> I am using ansible 1.9.1 and in the same role I have a couple of notify 
>>> to the  same service to be restarted.
>>>
>>> Apparently, ansible tries to restart 3-4 times for each notify and that 
>>> is undesirable.  
>>>
>>> I could do without notify and create register for each task and then at 
>>> the end I can have another task that would do when: any of the register 
>>> variable changed and restart but that is a hack.
>>>
>>> Please let me know if there is the right way to do this.
>>>
>>> Thank you very much in advance.
>>>
>>>  -- 
>>> 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 [email protected].
>>> To post to this group, send email to [email protected].
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/ansible-project/cbf63ea0-0594-4aa4-8d6c-ac984e2efe99%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/ansible-project/cbf63ea0-0594-4aa4-8d6c-ac984e2efe99%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> -- 
>> Matt Martz
>> @sivel
>> sivel.net
>>
>>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/4e2e3e8a-2b1a-4358-bc67-0afec6f49b04%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to