Follow these steps:
- Use the following command in your control machine:
ansible test-servers -m yum -a “name=nginx state=installed”
- Check if it is installed in your node machine, type the following command in your node:
ps waux | grep nginx
You can see a few processes are running with the PID 16387 and 772 which shows that Nginx has been installed and it is ready to get started.