##### SUMMARY
Allow to compute the status of a load balancer using a filter.
Closes#467
##### ISSUE TYPE
- Feature Pull Request
##### COMPONENT NAME
hetzner.hcloud.loab_balancer_status
### API Changes for Traffic Prices and Server Type Included Traffic
There will be a breaking change in the API regarding Traffic Prices and
Server Type Included Traffic on 2024-08-05. This release marks the
affected fields as `Deprecated`. Please check if this affects any of
your code and switch to the replacement fields where necessary.
You can learn more about this change in [our
changelog](https://docs.hetzner.cloud/changelog#2024-07-25-cloud-api-returns-traffic-information-in-different-format).
##### SUMMARY
Replace the constant poll interval of 1 second, with a truncated
exponential back off algorithm with jitter.
Below is a suite of poll interval (in seconds) generated by the new
algorithm:
```
1.49
2.14
5.46
6.51
6.57
5.57
5.98
7.13
6.59
7.10
5.54
5.03
6.56
5.96
6.72
7.21
7.05
5.31
5.60
6.33
6.82
5.42
6.08
6.60
TOTAL: 140.77
```
##### SUMMARY
- Do not remove the server from its placement group when the
`placement_group` argument is not specified.
- Pass an empty string to the `placement_group` argument to remove a
server from its placement group.
##### SUMMARY
Renamed the `allow_deprecated_image` to `image_allow_deprecated`
argument to ensure the `image` related options use the same namespace.
This is backward compatible, as we introduce a new alias for the old
option name.
##### SUMMARY
- Allow passing either the name or the ID of a resource to the different
arguments of the server module.
- Split the code into multiple smaller function and improve the code.
- Improve the module arguments documentation.
- Refactor and cleanups.
##### 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:
```yml
plugin: hetzner.hcloud.hcloud
hostname: "hcloud-{{ location }}-{{ name }}"
```
OR with a hostvars_prefix:
```yml
plugin: hetzner.hcloud.hcloud
hostvars_prefix: hcloud_
hostname: "hcloud-{{ hcloud_location }}-{{ hcloud_name }}"
```
Fixes#115
##### ISSUE TYPE
- Feature Pull Request
##### COMPONENT NAME
inventory
##### SUMMARY
The load balancer cookie lifetime field now returns the cookie lifetime
value, instead of the cookie name.
##### ISSUE TYPE
- Bugfix Pull Request
##### COMPONENT NAME
load_balancer_info
load_balancer_service
##### SUMMARY
The network could not be renamed before. This was discovered while
working on #448
##### ISSUE TYPE
- Feature Pull Request
##### COMPONENT NAME
network
##### SUMMARY
- Do not silence 'firewall still in use' deletions errors.
- Allow forcing the deletion of a firewall that is still in use.
Fixes#380
##### ISSUE TYPE
- Feature Pull Request
##### COMPONENT NAME
firewall
##### SUMMARY
Replace `ansible.netcommon` deprecated ipaddr utils with python
`ipaddress` module. The `ansible.netcommon` collection is no longer
required by the collections. We still use the `ansible.utils`
collections for testing
##### SUMMARY
The class scoped `cache` dict was being shared across all
`cached_session`, we now make sure that the cache is instance scoped.
Fixes#403
##### ISSUE TYPE
- Bugfix Pull Request
##### SUMMARY
- Rename the inventory `token` option to `api_token`, use aliases for
backward compatibility.
- Rename the inventory `token_env` option to `api_token_env`, use
aliases for backward compatibility.
- Deprecate the inventory `api_token_env` option, suggest using a lookup
plugin (`{{ lookup('ansible.builtin.env', 'YOUR_ENV_VAR') }}`) or use
the well-known `HCLOUD_TOKEN` environment variable name.
- Let ansible parse the options, remove homemade options parsing.
- Improve and document the existing `api_endpoint` option.
##### ISSUE TYPE
- Feature Pull Request
##### COMPONENT NAME
hcloud inventory
##### SUMMARY
This allows to use `module_defaults` against all the modules at once
using the new `hetzner.hcloud.all` `action_group`.
You can now pass the `api_token` argument using module_defaults:
```yaml
- name: Demonstrate the usage of the 'hetzner.hcloud.all' module_defaults group
hosts: localhost
connection: local
module_defaults:
group/hetzner.hcloud.all:
api_token: "{{ _vault_hcloud_api_token }}"
tasks:
- name: Create a volume
hetzner.hcloud.volume:
name: my-volume
location: fsn1
size: 100
state: present
register: volume
```
See the documentation and examples for more details.
##### ISSUE TYPE
- Feature Pull Request
##### SUMMARY
Make the api endpoint module argument consistent with the api token.
- Renamed the `endpoint` module argument to `api_endpoint`, backward
compatibility is maintained using an alias.
- Allow to configure it using the `HCLOUD_ENDPOINT` env var.
This makes the inventory config and the modules config a bit more
consistent.
##### ISSUE TYPE
- Feature Pull Request
##### SUMMARY
This simplifies the name of the modules from
`hetzner.hcloud.hcloud_firewall` to `hetzner.hcloud.firewall`. While
maintaining backward compatibility with the old names.
Further changes such as updating the test or the documentation will be
done in a future PR to maintain the git history when squashing the PRs.
##### ISSUE TYPE
- Feature Pull Request
##### SUMMARY
Add missing "created" field to ansible result
based on documentation
https://docs.hetzner.cloud/#servers-get-all-servers
```
created
string required
Point in time when the Resource was created (in ISO-8601 format)
```
##### ISSUE TYPE
- Feature Pull Request
##### COMPONENT NAME
hcloud_server_info
hcloud_server
Co-authored-by: Pawel Urbanek <pawel.urbanek@medvc.eu>
##### SUMMARY
Closes#204
Return the `server_types` dict when querying the datacenters.
##### ISSUE TYPE
- Feature Pull Request
##### COMPONENT NAME
hcloud_datacenter_info
##### SUMMARY
- Speed up pre-commit by moving some tasks out of pre-commit
- Move network related hooks out of pre-commit (allow enabling
pre-commit.ci)
- Some optimization
- Use pre-commit.ci
##### SUMMARY
The version tag regex allowing to publish to ansible-galaxy does not
allow versions to be prefixed with a v:
468493fef4/zuul.d/pipelines.yaml (L146-L155)
Introducing the v prefix is also breaking with the previous tag naming
convention.
##### SUMMARY
When managing a tcp/udp firewall rule, provide a clear error message
when the port is missing from the rule.
Closes#344
##### ISSUE TYPE
- Bugfix Pull Request
##### COMPONENT NAME
hcloud_firewall
##### SUMMARY
In the `hcloud_load_balancer_service` return data, the
`health_check.http.certificates` field must be named
`health_check.http.status_codes`.
https://docs.hetzner.cloud/#load-balancers-get-a-load-balancerFixes#332
##### ISSUE TYPE
- Bugfix Pull Request
##### COMPONENT NAME
hcloud_load_balancer_service
##### SUMMARY
The current release process for this project requires multiple manual
local steps to prepare and then tag the release. This introduces the
standard release-please workflow we have in most of our integrations.
Release-please will open a new PR whenever there is a releasable change
and it updates the CHANGELOG & other files automatically in this PR.
Once the PR is merged a new tag is created.
This repository has some additional complexity as it uses
`antsibull-changelog` to maintain the user-facing changelog. This is
implemented ina second job in the `release-please` workflow which
executes when the release-please PR is updated and then runs
`antsibull-changelog release` against the version. The resulting changes
are pushed as a second commit to the same PR.
##### SUMMARY
Prepare v2.1.1 release.
This should also trigger a new publish process, since 2.1.0 never had
the change to be published to ansible-galaxy.