mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +00:00
Bugfix: allow hcloud.yml and hcloud.yaml again as inventory configuration.
This commit is contained in:
parent
769a63ff22
commit
3df221eb82
4 changed files with 9 additions and 4 deletions
|
|
@ -0,0 +1,2 @@
|
|||
bugfix:
|
||||
- hcloud inventory plugin - Allow usage of hcloud.yml and hcloud.yaml - this was removed by error within the migration from build-in ansible to our collection
|
||||
|
|
@ -230,7 +230,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
|
|||
"""Return the possibly of a file being consumable by this plugin."""
|
||||
return (
|
||||
super(InventoryModule, self).verify_file(path) and
|
||||
path.endswith((self.NAME + ".yaml", self.NAME + ".yml"))
|
||||
path.endswith(("hcloud.yaml", "hcloud.yml"))
|
||||
)
|
||||
|
||||
def parse(self, inventory, loader, path, cache=True):
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ class AnsibleHcloudLoadBalancer(Hcloud):
|
|||
"location": to_native(self.hcloud_load_balancer.location.name),
|
||||
"labels": self.hcloud_load_balancer.labels,
|
||||
"delete_protection": self.hcloud_load_balancer.protection["delete"],
|
||||
"disable_public_interface": self.hcloud_load_balancer.public_net.enabled
|
||||
"disable_public_interface": False if self.hcloud_load_balancer.public_net.enabled else True,
|
||||
}
|
||||
|
||||
def _get_load_balancer(self):
|
||||
|
|
@ -219,7 +219,6 @@ class AnsibleHcloudLoadBalancer(Hcloud):
|
|||
|
||||
self._mark_as_changed()
|
||||
self._get_load_balancer()
|
||||
self._update_load_balancer()
|
||||
|
||||
def _update_load_balancer(self):
|
||||
try:
|
||||
|
|
@ -251,8 +250,10 @@ class AnsibleHcloudLoadBalancer(Hcloud):
|
|||
def present_load_balancer(self):
|
||||
self._get_load_balancer()
|
||||
if self.hcloud_load_balancer is None:
|
||||
self.module.debug(msg="Create")
|
||||
self._create_load_balancer()
|
||||
else:
|
||||
self.module.debug(msg="Update")
|
||||
self._update_load_balancer()
|
||||
|
||||
def delete_load_balancer(self):
|
||||
|
|
|
|||
|
|
@ -85,7 +85,9 @@ find plugins -type d -empty -print -delete
|
|||
ansible-test env --dump --show --timeout "50" --color -v
|
||||
|
||||
group="${args[1]}"
|
||||
if [[ "${test}" =~ integration ]]; then
|
||||
echo $test
|
||||
if [[ "${test}" =~ hcloud ]]; then
|
||||
group="${args[3]}"
|
||||
bash tests/utils/gitlab/integration.sh "shippable/hcloud/group${group}/"
|
||||
else
|
||||
bash tests/utils/gitlab/sanity.sh "sanity/${group}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue