Restart service on all hosts ansible

Ad-hoc service restart with privilege escalation (-b)

ansible webservers -m service -a 'name=nginx state=restarted' -b -i inventory.ini
more ansible all 56 commands →