The -l or --limit= options can be used to limit a task to be performed against certain target servers. For example, let's say your inventory.yml file that contains the target hosts contains the following.
all: children: windows: hosts: server1.example.com: server2.example.com: linux: hosts: server3.example.com: server4.example.com:
In this example, the following command could be used to target only server1.example.com.
ansible-playbook playbook.yml -i inventory.yml --limit=server1.example.com
play_hosts can be used to store the server in a variable.