I would rather just set hosts:all and execute the playbook with limit to only the host you need to execute.
- name: ansible application deploy
hosts: all
vars:
project_path: "{{ host_project_path|default('/var/www/html') }}"
Execute the playbook using the limit clause:
ansible-playbook app_deploy.yml -l IPP_ADDR
Another possibilite is creating a file with the ip address.
/tmp/execute_only_that_host
FILE CONTENT:
IPP_ADDR
Executing: ansible-playbook app_deploy.yml -l @/tmp/execute_only_that_host
I recommend this approach because it's your own application that will call your playbook, you can always insure it called with limit, therefore you don't need to bother with hosts in the top of your playbook.