---
# file: main.yml

- hosts: all
  gather_facts: yes
  become: yes

  vars_files:
    - vars.yml

  tasks:

    - include: tasks/ruby.yml
    - include: tasks/mongodb.yml

---
# file: main.yml

- hosts: all
  gather_facts: yes
  become: yes

  vars_files:
    - vars.yml

  tasks:

    - include: tasks/ruby.yml
      tags: ruby

    - include: tasks/mongodb.yml
      tags: mongodb

Add tags to ansible tasks
Add tags to ansible tasks
