Suppose I have a role called \"apache\"
Now I want to execute that role on host 192.168.0.10 from the command line from Ansible host
ansible-playbook
I have written a small Ansible plugin, called auto_tags
, that dynamically generates for each role in your playbook a tag of the same name. You can find it here.
After installing it (instructions are in the gist above) you could then execute a specific role with:
ansible-playbook -i "192.168.0.10" --tags "name_of_role"