- hosts: testhost2 tasks: - name: Assert that only tasks with tags were run assert: that: - canary_var1 == 'playbook1 imported' - canary_var2 == 'playbook2 imported' - canary_var3 is not defined tags: - validate