Any clue as to how to accomplish this?
My Ansible Tower inventory has a list of hosts in it, all in ‘stopped’ state.
I’d like to use that inventory, assign it to a playbook, that will loop through each machine in the inventory, from the localhost, and issue a command to start the instance to AWS.
I’ve tried several different ways to do this, but to no avail.
It seems that because I’m specifying an inventory to the job, and that inventory only has stopped instances in it, there’s no way to execute a task on the localhost, loop through that inventory, and start them, one by one?
Here is some code that contains all the different lines I’ve tried…