same with_items for multiple tasks

How can we create one with_items and use it for multiple tasks

Then you need to put the tasks in a yaml file and use include and with_items.

Hello Kai Stian Olstad,

My best greeting to you.

I want to create 8 instances with 8 different names to ec2 instances. Is it possible in with_items in a single playbook.yml?

Please give suggested links or example playbooks.

Thank you.