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!
--
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/0ab2b48b-92ff-4146-88ee-a5c581fbaff4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.