ansible-flask-stack icon indicating copy to clipboard operation
ansible-flask-stack copied to clipboard

Tags not filtering

Open nicgirault opened this issue 8 years ago • 0 comments

You misunderstand the use of tags (it's very confusing). As explained here: http://docs.ansible.com/ansible/latest/playbooks_tags.html You can **ONLY** filter tasks based on tags from the command line with –tags or –skip-tags. Adding “tags:” in any part of a play (including roles) adds those tags to the contained tasks.

To fix this problem I removed the tags from my playbook and I run:

ansible-playbook playbook.yml -i staging --tags "flaskapp-deploy"

which is not the same than:

- name: Playbook
  hosts: all
  remote_user: ubuntu
  become: yes
  vars_files:
    - ./vars.yml
  roles:
    - {role: ansible-flask-stack, tags: ["flaskapp-deploy"]}

nicgirault avatar Aug 31 '17 11:08 nicgirault