Skip to content

Instantly share code, notes, and snippets.

@mohclips
Created February 11, 2017 14:41
Show Gist options
  • Save mohclips/4734b3687d13d3cfc23b3598dd632d12 to your computer and use it in GitHub Desktop.
Save mohclips/4734b3687d13d3cfc23b3598dd632d12 to your computer and use it in GitHub Desktop.
tag test in Ansible for Kenny B
#!/usr/bin/env ansible-playbook
# vim: noai:ts=2:sw=2:et
---
# run: ansible-playbook ./tags_test.yml --tags=one,two,block1
- name: "tags test"
hosts: localhost
gather_facts: no
tasks:
- debug: msg="start"
- debug: msg="one"
tags: one
- debug: msg="two"
tags: two
- debug: msg="three"
tags: three
- debug: msg="always"
tags: always
- block:
- debug: msg="block1"
tags: block1
- block:
- debug: msg="block2"
tags: block2
- block:
- debug: msg="always block"
tags: always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment