- hosts: all
tasks:
- name: set marker
set_fact:
marker: marker
- name: group by marker
group_by: key=marker
changed_when: no
- name: target task
debug: msg="Performing task on {{ inventory_hostname }}, item is {{ item }}"
with_items: groups['marker']
when: "hostvars[item].inventory_hostname == inventory_hostname"
Last active
August 29, 2015 14:21
-
-
Save hryamzik/36a078ec0d1be2f6d48c to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment