Hi,

I was trying to upgrade from ansible 1.8.4 to ansible 2, and noticed that 
some of my roles with meta dependencies stopped working.

I have these roles

role-main1/meta/main.yml

---
dependencies:
  - { role: role-dependency }



role-main2/meta/main.yml

---
dependencies:
  - { role: role-dependency }

role-dependency/meta/main.yml

---

allow_duplicates: yes


Now, I have a playbook which calls the roles role-main1 and role-main2 based on 
some condition

- { role: role-main1, when: (z1|bool) }
- { role: role-main2, when: (z2|bool) }


Everything works fine if both the conditions are met and both roles get called

if z1=true z2=true 

1. role-dependency => executed
2. role-main1 => executed
3. role-dependency => executed
4. role-main2 => executed


But if the first condition fails then the dependency fails to execute even for 
the second role

If z1=false z2=true

1. role-dependency => skipped
2. role-main1 =>  skipped
3. role-dependency => skipped   (We were expecting this to be executed)
4. role-main2 => executed


This was working in my earlier version of ansible (1.8.4), I even tested it in 
1.9 version and it worked fine. It seems to be broken in ansible 2 series.


Can someone help here.


Thanks

Deep


-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ca54071e-2e2b-46ea-b26e-5dc359f412a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to