mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
15 lines
582 B
YAML
15 lines
582 B
YAML
|
plugin: community.general.cloudscale
|
||
|
ansible_host: private
|
||
|
inventory_hostname: name
|
||
|
groups:
|
||
|
ansible: inventory_hostname.startswith('ansible')
|
||
|
private_net: (cloudscale.interfaces | selectattr('type', 'equalto', 'private') | list | length) > 0
|
||
|
keyed_groups:
|
||
|
- prefix: net
|
||
|
key: (cloudscale.interfaces.0.addresses.0.address + '/' + cloudscale.interfaces.0.addresses.0.prefix_length | string) | ansible.netcommon.ipaddr('network')
|
||
|
- prefix: distro
|
||
|
key: cloudscale.image.operating_system
|
||
|
compose:
|
||
|
flavor_image: cloudscale.flavor.slug + '_' + cloudscale.image.slug
|
||
|
strict: false
|