when I defined tags in main.yml and roles, i couldn't able to execute 
specific tags by using --tags or --skip-tags... 

when I run the below with --tags=tag1 , I see whole playbook has executing 
I have defined a task ( 127.0.0.1 ) in role, that's also not working after 
role executed
 
The below are my tags,

++++++++++++++++++++++++++++++++++++++++++++
playbook: validation.yml

  play #1 (hosts): hosts      TAGS: []
      TASK TAGS: [tag1, tag2, tag3, tag4, tag5 ]

  play #2 (127.0.0.1): 127.0.0.1        TAGS: []
      TASK TAGS: []
+++++++++++++++++++++++++++++++++++++++++++++
$/etc/ansible/roles/validation/main.yml
---
# tasks file for validation

- include_tasks: task 1.yml
  tags: tag1

- include_tasks: task 2.yml
  tags: tag 2

- include_tasks: task 3.yml
  tags: tag 3

- include_tasks: task 4.yml
  tags: tag 4

- include_tasks: task 5.yml
  tags: tag 5
+++++++++++++++++++++++++++++++++++++++++++++ 
This is playbook defined roles with tasks  included 
---
- hosts: hosts
  connection: local
  gather_facts: no
  roles:
    - { role: validation, tags: [ 'tag1, 'tag2', 'tag3', 'tag4', 'tag5' ] }
 
- hosts: 127.0.0.1
  gather_facts: no
  vars_files:
     - ex.yml
  tasks:
  - name: here some tasks executes 
   +++++++++++++++++++++++++++++++++++++++++++++++++++

THanks,
Ramesh

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a6208bc6-5877-41af-ad3c-269735f98563n%40googlegroups.com.

Reply via email to