Hi Folks, I am looking for a simple way to have Ansible perform the following automation for me:
1. From a set of N hosts, find out which host has the lowest CPU usage at the moment 2. Run a command on *only that host*. This pattern could be extended to a general case of: Run a command on a subset of hosts matching a condition which is not static. This could apply for the following types of use cases: - Find out which hosts are running low on disk space, and only expand disk space on the hosts which are running low - Find out which hosts are lacking a particular upgrade, and only upgrade those hosts - Only run a command on machines which are not currently under heavy load This seems like a common and desirable enough pattern, but as far as I can tell there is not a well defined way to execute this with Ansible. Is there a simple way to do this with a playbook, or do I need to write a strategy plugin? Thanks, Eric -- 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/8425baa9-e324-4f1f-a459-8ca35cca3a54%40googlegroups.com.
