Closed tklicki closed 8 years ago
I suppose that you could check the state of any variables that the role registers. Currently there's no universal location that could be checked to see if a role changed something.
Perhaps if you would say what are you interested in, I could help more. What are you looking for?
Thank you for very fast response and great idea. Do you think that something like this would be ok?
- name: Task name
(...)
when: ifupdown_register_interfaces_generator|changed
Sure, although if you want for your role to work when debops.ifupdown
isn't included, you should rather use something like:
- name: Do the thing
when: ifupdown_register_interfaces_generator|d() and
ifupdown_register_interfaces_generator|changed
That way if the role is not included in the playbook, your role will still work and just not run the task.
Thank you very much!
Hi, I'm using debops.ifupdown in some other role as dependency. I would like to know if it has changed anything on the host. I want to make some conditional check using "when:" inside other tasks I wrote myself.
What would be the best way to do this? Is there any variable that i can check like "ifupdown_var.changed" that I can use?
Regards. Tomek