1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/library/inventory/group_by

24 lines
675 B
Text
Raw Normal View History

2012-10-27 19:47:47 +02:00
# -*- 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"
2012-10-27 19:47:47 +02:00
options:
key:
description:
- The variables whose values will be used as groups
required: true
author: Jeroen Hoekx
examples:
- description: Create groups based on the machine architecture
code: group_by key=${ansible_machine}
- description: Create groups like 'kvm-host'
code: group_by key=${ansible_virtualization_type}-${ansible_virtualization_role}
notes:
- Spaces in group names are converted to dashes '-'.
'''