I\'m setting up an Ansible playbook to set up a couple servers. There are a couple of tasks that I only want to run if the current host is my local dev host, named \"local\"
The necessary variable is inventory_hostname.
- name: Install this only for local dev machine pip: name=pyramid when: inventory_hostname == "local"
It is somewhat hidden in the documentation at the bottom of this section.