ansible-flask-stack
ansible-flask-stack copied to clipboard
Tags not filtering
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"]}