If you have a chef background, you will be familiar with the idea of having a run_list that looks something like this;

“run_list”: [ “recipe[base]”, “recipe[java]”, “recipe[logstash::agent]”, “recipe[mysql::server]”, “recipe[mysql::client]”,” ],

<a href="#">Hello world</a>

PLAY[Converge] **************************************************************************
TASK [Gathering Facts] ******************************************************************
ok: [localhost]

PLAY RECAP ******************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=0

This is obviously useful in production to build up customized configurations for nodes, but it’s also handy in development so you can run just the bit of code you are working on to test it’s effect. The chef-client has the handy override run-list option -o which can be used to run a single recipe;

# chef-client -o "recipe[logstash::base]"

But ansible doesn’t have an equivalent option to it’s ansible-playbook command. The nearest thing it has is the tags option. Which is used like so;

$ ansible-playbook playbook-1.yml --tags wordpress-template

When combined with blocks, tags can be pretty powerful.

- tags: [ mysql ]
  become: yes