Imagine this ansible playbook:
- name: debug foo
debug: msg=foo
tags:
- foo
- name: debug bar
debug: msg=bar
tags:
- bar
- name: debug baz
debug: msg=baz
tags:
- foo
- bar
How can I run only the debug baz
task? I want to say only run tasks which are tagged with foo
AND bar
. Is that possible?
I tried this, but it will run all 3 tasks:
ansible-playbook foo.yml -t foo,bar
tags: ['foo', 'bar', 'foo-bar']
which is a little ugly... :-(