Skip to content

Instantly share code, notes, and snippets.

@phips
Created March 13, 2014 15:30
Show Gist options
  • Save phips/9530621 to your computer and use it in GitHub Desktop.
Save phips/9530621 to your computer and use it in GitHub Desktop.
Ansible dynamic grouping
---
- hosts: all
tasks:
- group_by: key={{ ansible_virtualization_type }}
# Include *all* groups here
- include: webservers.yml
##
- hosts: VMware
sudo: true
roles:
- yumrepos
- vmware
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment