ansible/library/inventory/group_by
Jan-Piet Mens 5c69918d53 DOCS: standardize on EXAMPLES (a.k.a. Docs-JumboPatch JetLag Edition)
Migrated all examples: in DOCUMENTATION=''' string to standalone EXAMPLES=''' string
  Added deprecation warning to moduledev.rst and remove deprecated example from it
  Fixed up a few typos and uppercased some acronyms.
  add consistency to how EXAMPLES are formatted
2013-06-15 20:54:25 +02:00

25 lines
643 B
Python

# -*- mode: python -*-
DOCUMENTATION = '''
---
module: group_by
short_description: Create Ansible groups based on facts
description:
- Use facts to create ad-hoc groups that can be used later in a playbook.
version_added: "0.9"
options:
key:
description:
- The variables whose values will be used as groups
required: true
author: Jeroen Hoekx
notes:
- Spaces in group names are converted to dashes '-'.
'''
EXAMPLES = '''
# Create groups based on the machine architecture
- group_by: key=${ansible_machine}
# Create groups like 'kvm-host'
- group_by: key=${ansible_virtualization_type}-${ansible_virtualization_role}
'''