Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(inventory): allow templating instances hostname #455

Merged

Conversation

jooola
Copy link
Collaborator

@jooola jooola commented Feb 2, 2024

SUMMARY

Adds a hostname option that allow the user to pass a template to add a prefix or use the hostvars to build the hostname.

For example:

plugin: hetzner.hcloud.hcloud

hostname: "hcloud-{{ location }}-{{ name }}"

OR with a hostvars_prefix:

plugin: hetzner.hcloud.hcloud

hostvars_prefix: hcloud_
hostname: "hcloud-{{ hcloud_location }}-{{ hcloud_name }}"

Fixes #115

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

inventory

@jooola jooola changed the title Allow custom inventory hostname feat(inventory): allow templating instances hostname Feb 2, 2024
@jooola jooola force-pushed the allow-custom-inventory-hostname branch 2 times, most recently from cf7d149 to 81cbfd8 Compare February 5, 2024 13:24
@jooola jooola marked this pull request as ready for review February 5, 2024 13:24
@jooola jooola requested a review from apricote February 5, 2024 13:24
@jooola jooola force-pushed the allow-custom-inventory-hostname branch from 81cbfd8 to 52f98bb Compare February 5, 2024 13:24
@jooola jooola force-pushed the allow-custom-inventory-hostname branch from 52f98bb to cab71c8 Compare February 5, 2024 13:26
@jooola jooola merged commit be404ef into ansible-collections:main Feb 5, 2024
24 of 25 checks passed
@jooola jooola deleted the allow-custom-inventory-hostname branch February 5, 2024 13:32
jooola pushed a commit that referenced this pull request Feb 5, 2024
🤖 I have created a release *beep* *boop*
---


##
[3.0.0](2.5.0...3.0.0)
(2024-02-05)


### ⚠ BREAKING CHANGES

* drop support for ansible-core 2.13
([#450](#450))
* always return iso-8601 formatted date time
([#453](#453))
* remove inventory `api_token_env` option
([#454](#454))

### Features

* drop support for ansible-core 2.13
([#450](#450))
([96f8009](96f8009)),
closes
[#400](#400)
* **inventory:** allow templating instances hostname
([#455](#455))
([be404ef](be404ef))
* remove inventory `api_token_env` option
([#454](#454))
([d0c82ae](d0c82ae))


### Bug Fixes

* allow renaming networks
([#449](#449))
([742cfe6](742cfe6))
* always return iso-8601 formatted date time
([#453](#453))
([55d2616](55d2616))
* load balancer invalid cookie lifetime value returned
([#452](#452))
([86b7662](86b7662))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inventory: allow custom hostname using templates
2 participants