ansible playbook omit tag code example
Example 1: run a tag with ansible
ansible-playbook myplay.yaml --tags mytag
Example 2: ansible playbook omit tag
# Use the --skip-tags flag
ansible-playbook myplaybook.yaml --skip-tags mytag
Example 3: how to use tags in ansible
# Tags goes at same indentation as name or service:
- name: Create Postgres Container
tags: createcontainer
docker_container:
name: mypostgres
...
# Then in the command line:
ansible-playbook myplaybook.yaml --tags createcontainer