Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Using a loop instead of the group directly to do some processing
- hosts: localhost
connection: local
gather_facts: false
tasks:
- name: Get tag Name
debug: msg="Host {{ item }} is tagged with {{ hostvars[item]['ec2_tag_Name'] }}"
with_items: groups.tag_COGS_dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment