Closed tersmitten closed 7 years ago
In theory it is not necessary, but if for some reason a device is mentioned twice, this would break really strange. Basically I could not come up with a usable API that is usable for all tasks and ensures a device is never mentioned twice.
Basically I could not come up with a usable API that is usable for all tasks and ensures a device is never mentioned twice
Where is this a problem?
Good question. I don't remember the exact reasoning any more. Maybe it was that I needed to be able to combine configurations easily or I had issues with iterating a hash. But it may also be that the reason is gone now. Managing the device files is much more clean today, compared to my initial drafts. Maybe I intended to allow the mentioning of different operating modes for one device. I guess this won't fully work with our current templates and I cannot think of a use case for this. (Maybe a fallback?)
Now, we have to keep the config format or we break it for all the users. So we should at least have a very good reason to change it.
Sorry that I could not provide a better answer.
No problem, thanks for your explaination
Thanks for thew great role! I was curious why you use the
groupby
filter in the following line: https://github.com/dresden-weekly/ansible-network-interfaces/blob/develop/tasks/main.yml#L34Doesn't a regular
with_items
give you enough data (in the correct format) in both tasks, handlers and templates?