mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
665 B
Python
26 lines
665 B
Python
12 years ago
|
# -*- 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.
|
||
12 years ago
|
version_added: "0.9"
|
||
12 years ago
|
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 '-'.
|
||
|
'''
|
||
12 years ago
|
|
||
|
EXAMPLES = '''
|
||
|
# Create groups based on the machine architecture
|
||
11 years ago
|
- group_by: key=machine_{{ ansible_machine }}
|
||
12 years ago
|
# Create groups like 'kvm-host'
|
||
11 years ago
|
- group_by: key=virt_{{ ansible_virtualization_type }}_{{ ansible_virtualization_role }}
|
||
12 years ago
|
'''
|