This will run the tasks on the 'control node' (where you run ansible itself):
hosts: localhost
This will run the tasks on the hosts in the inventory.
hosts: all
--
Walter Rowe, Chief
Infrastructure Services
Office of Information Systems Management
National Institute of Standards and Technology
United States Department of Commerce