Hey everyone,
I would like to have your input on that question.
I have a really special use case where I want to run an endless playbook (on localhost only). I basically want to implement an endless loop on my playbook. As we all know, looping over a set of tasks or blocks is not possible with a statement like while true, which will look like:
### role/tasks/main.yml
---
- include: run-in-loop.yml
until: False
Right now looping over includes is doable by doing a with_ statement. What I trying to achieve right now would look like:
### role/tasks/main.yml
---
- include: run-in-loop.yml
with_sequence: start=0 end=<+INFINITE>
loop_control:
loop_var: main_item
This might not be a good idea at all, as I have no idea how Ansible will consume resources on the server (Memory especially).
I can of course use a higher level command that will keep triggering my playbook in a loop, but I was actually thinking about implementing a custom strategy called endless for example.
This strategy will be based on the classic linear strategy.
Is that a really really bad idea or you think that could be doable?
Thanks in advance for your thoughts!