Have a look to with_sequence On Fri, Dec 10, 2021, 22:05 Mike Eggleston <[email protected]> wrote:
> I know I can do this from a shell script. I wonder if I can do this in > pure Ansible. > I was thinking about clusters recently. I know I can use the VM module to > spin up a VM. > If I wanted 1,000 nodes, how would I loop inside Ansible for the nodes? > Using the shell I would do something like (not tested): > > for i in `seq 000 999` > do > ansible-playbook -e nodename=“beofulfnode$i” create-a-node.yml > done > > How to do this looping in pure Ansible? > > Mike > > -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/A6093B7A-C19D-4060-9320-A2F50540677B%40gmail.com > . > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAFtje5PvFTjAj_ZHy%3DAxy_HVH8FQiwc-Pvy6qyguJSq7S4GQVA%40mail.gmail.com.
