ansible-collection-hetzner-.../changelogs/fragments/add-inventory-hostvars-prefix-and-suffix-option.yml
Jonas L 4e3f89aed3
feat: add hostvars_prefix and hostvars_suffix options to inventory hostvars (#423)
##### SUMMARY

Add `hostvars_prefix` and `hostvars_suffix` options to customize the
inventory host variables keys.

For example, with `hostvars_prefix: hcloud_ `, the host vars will be
stored as follows:
```json
{
    "_meta": {
        "hostvars": {
            "tmp": {
                "ansible_host": "65.109.169.27",
                "hcloud_architecture": "x86",
                "hcloud_datacenter": "hel1-dc2",
                "hcloud_id": 40573407,
                "hcloud_image_id": 114690387,
                "hcloud_image_name": "debian-12",
                "hcloud_image_os_flavor": "debian",
                "hcloud_ipv4": "65.109.169.27",
                "hcloud_ipv6_network_mask": "64",
                "hcloud_ipv6_network": "2a01:4f9:c012:4377::",
                "hcloud_ipv6": "2a01:4f9:c012:4377::1",
                "hcloud_labels": {},
                "hcloud_location": "hel1",
                "hcloud_name": "tmp",
                "hcloud_private_networks": [],
                "hcloud_server_type": "cx11",
                "hcloud_status": "running",
                "hcloud_type": "cx11"
            }
        }
    }
}
``` 

Related to #116
2023-12-15 15:40:37 +01:00

4 lines
140 B
YAML

minor_changes:
- >
inventory - Add `hostvars_prefix` and hostvars_suffix` options to customize the
inventory host variables keys.