mirror of
https://github.com/ansible-collections/hetzner.hcloud
synced 2024-11-10 06:34:13 +00:00
parent
3da91df8c3
commit
5190535323
23 changed files with 41 additions and 200 deletions
9
changelogs/fragments/remove-deprecated-facts-modules.yml
Normal file
9
changelogs/fragments/remove-deprecated-facts-modules.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
removed_features:
|
||||
- hcloud_datacenter_facts Removed deprecated facts module
|
||||
- hcloud_floating_ip_facts Removed deprecated facts module
|
||||
- hcloud_image_facts Removed deprecated facts module
|
||||
- hcloud_location_facts Removed deprecated facts module
|
||||
- hcloud_server_facts Removed deprecated facts module
|
||||
- hcloud_server_type_facts Removed deprecated facts module
|
||||
- hcloud_ssh_key_facts Removed deprecated facts module
|
||||
- hcloud_volume_facts Removed deprecated facts module
|
|
@ -1,35 +1 @@
|
|||
requires_ansible: ">=2.13.0"
|
||||
plugin_routing:
|
||||
modules:
|
||||
hcloud_location_facts:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
hcloud_server_type_facts:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
hcloud_image_facts:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
hcloud_volume_facts:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
hcloud_floating_ip_facts:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
hcloud_ssh_key_facts:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
hcloud_datacenter_facts:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
hcloud_server_facts:
|
||||
deprecation:
|
||||
removal_version: 2.0.0
|
||||
warning_text: see plugin documentation for details
|
||||
|
|
|
@ -142,8 +142,8 @@ class AnsibleHcloudCertificateInfo(Hcloud):
|
|||
|
||||
def main():
|
||||
module = AnsibleHcloudCertificateInfo.define_module()
|
||||
|
||||
hcloud = AnsibleHcloudCertificateInfo(module)
|
||||
|
||||
hcloud.get_certificates()
|
||||
result = hcloud.get_result()
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
hcloud_datacenter_info.py
|
|
@ -12,8 +12,6 @@ short_description: Gather info about the Hetzner Cloud datacenters.
|
|||
|
||||
description:
|
||||
- Gather info about your Hetzner Cloud datacenters.
|
||||
- This module was called C(hcloud_datacenter_facts) before Ansible 2.9, returning C(ansible_facts) and C(hcloud_datacenter_facts).
|
||||
Note that the M(hetzner.hcloud.hcloud_datacenter_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_datacenter_info)!
|
||||
|
||||
author:
|
||||
- Lukas Kaemmerling (@LKaemmerling)
|
||||
|
@ -45,8 +43,6 @@ RETURN = """
|
|||
hcloud_datacenter_info:
|
||||
description:
|
||||
- The datacenter info as list
|
||||
- This module was called C(hcloud_datacenter_facts) before Ansible 2.9, returning C(ansible_facts) and C(hcloud_datacenter_facts).
|
||||
Note that the M(hetzner.hcloud.hcloud_datacenter_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_datacenter_info)!
|
||||
returned: always
|
||||
type: complex
|
||||
contains:
|
||||
|
@ -129,23 +125,11 @@ class AnsibleHcloudDatacenterInfo(Hcloud):
|
|||
|
||||
def main():
|
||||
module = AnsibleHcloudDatacenterInfo.define_module()
|
||||
|
||||
is_old_facts = module._name == "hcloud_datacenter_facts"
|
||||
if is_old_facts:
|
||||
module.deprecate(
|
||||
"The 'hcloud_datacenter_facts' module has been renamed to 'hcloud_datacenter_info', "
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version="2.0.0",
|
||||
collection_name="hetzner.hcloud",
|
||||
)
|
||||
hcloud = AnsibleHcloudDatacenterInfo(module)
|
||||
|
||||
hcloud.get_datacenters()
|
||||
result = hcloud.get_result()
|
||||
if is_old_facts:
|
||||
ansible_info = {"hcloud_datacenter_facts": result["hcloud_datacenter_info"]}
|
||||
module.exit_json(ansible_facts=ansible_info)
|
||||
else:
|
||||
|
||||
ansible_info = {"hcloud_datacenter_info": result["hcloud_datacenter_info"]}
|
||||
module.exit_json(**ansible_info)
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
hcloud_floating_ip_info.py
|
|
@ -12,8 +12,6 @@ short_description: Gather infos about the Hetzner Cloud Floating IPs.
|
|||
|
||||
description:
|
||||
- Gather facts about your Hetzner Cloud Floating IPs.
|
||||
- This module was called C(hcloud_floating_ip_facts) before Ansible 2.9, returning C(ansible_facts) and C(hcloud_floating_ip_facts).
|
||||
Note that the M(hetzner.hcloud.hcloud_floating_ip_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_floating_ip_info)!
|
||||
|
||||
author:
|
||||
- Lukas Kaemmerling (@LKaemmerling)
|
||||
|
@ -156,24 +154,11 @@ class AnsibleHcloudFloatingIPInfo(Hcloud):
|
|||
|
||||
def main():
|
||||
module = AnsibleHcloudFloatingIPInfo.define_module()
|
||||
|
||||
is_old_facts = module._name == "hcloud_floating_ip_facts"
|
||||
if is_old_facts:
|
||||
module.deprecate(
|
||||
"The 'hcloud_floating_ip_facts' module has been renamed to 'hcloud_floating_ip_info', "
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version="2.0.0",
|
||||
collection_name="hetzner.hcloud",
|
||||
)
|
||||
|
||||
hcloud = AnsibleHcloudFloatingIPInfo(module)
|
||||
|
||||
hcloud.get_floating_ips()
|
||||
result = hcloud.get_result()
|
||||
if is_old_facts:
|
||||
ansible_info = {"hcloud_floating_ip_facts": result["hcloud_floating_ip_info"]}
|
||||
module.exit_json(ansible_facts=ansible_info)
|
||||
else:
|
||||
|
||||
ansible_info = {"hcloud_floating_ip_info": result["hcloud_floating_ip_info"]}
|
||||
module.exit_json(**ansible_info)
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
hcloud_image_info.py
|
|
@ -13,8 +13,6 @@ short_description: Gather infos about your Hetzner Cloud images.
|
|||
|
||||
description:
|
||||
- Gather infos about your Hetzner Cloud images.
|
||||
- This module was called C(hcloud_location_facts) before Ansible 2.9, returning C(ansible_facts) and C(hcloud_location_facts).
|
||||
Note that the M(hetzner.hcloud.hcloud_image_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_image_info)!
|
||||
|
||||
author:
|
||||
- Lukas Kaemmerling (@LKaemmerling)
|
||||
|
@ -192,29 +190,11 @@ class AnsibleHcloudImageInfo(Hcloud):
|
|||
|
||||
def main():
|
||||
module = AnsibleHcloudImageInfo.define_module()
|
||||
|
||||
is_old_facts = module._name == "hcloud_image_facts"
|
||||
if is_old_facts:
|
||||
module.deprecate(
|
||||
"The 'hcloud_image_facts' module has been renamed to 'hcloud_image_info', "
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version="2.0.0",
|
||||
collection_name="hetzner.hcloud",
|
||||
)
|
||||
|
||||
hcloud = AnsibleHcloudImageInfo(module)
|
||||
|
||||
hcloud.get_images()
|
||||
result = hcloud.get_result()
|
||||
|
||||
if is_old_facts:
|
||||
ansible_info = {
|
||||
"hcloud_image_facts": result["hcloud_image_info"],
|
||||
# We keep the key with a typo below to prevent a breaking changes.
|
||||
# The entire module will be removed in v2.0.0
|
||||
"hcloud_imagen_facts": result["hcloud_image_info"],
|
||||
}
|
||||
module.exit_json(ansible_facts=ansible_info)
|
||||
else:
|
||||
ansible_info = {"hcloud_image_info": result["hcloud_image_info"]}
|
||||
module.exit_json(**ansible_info)
|
||||
|
||||
|
|
|
@ -378,8 +378,8 @@ class AnsibleHcloudLoadBalancerInfo(Hcloud):
|
|||
|
||||
def main():
|
||||
module = AnsibleHcloudLoadBalancerInfo.define_module()
|
||||
|
||||
hcloud = AnsibleHcloudLoadBalancerInfo(module)
|
||||
|
||||
hcloud.get_load_balancers()
|
||||
result = hcloud.get_result()
|
||||
|
||||
|
|
|
@ -142,10 +142,11 @@ class AnsibleHcloudLoadBalancerTypeInfo(Hcloud):
|
|||
|
||||
def main():
|
||||
module = AnsibleHcloudLoadBalancerTypeInfo.define_module()
|
||||
|
||||
hcloud = AnsibleHcloudLoadBalancerTypeInfo(module)
|
||||
|
||||
hcloud.get_load_balancer_types()
|
||||
result = hcloud.get_result()
|
||||
|
||||
ansible_info = {"hcloud_load_balancer_type_info": result["hcloud_load_balancer_type_info"]}
|
||||
module.exit_json(**ansible_info)
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
hcloud_location_info.py
|
|
@ -13,8 +13,6 @@ short_description: Gather infos about your Hetzner Cloud locations.
|
|||
|
||||
description:
|
||||
- Gather infos about your Hetzner Cloud locations.
|
||||
- This module was called C(hcloud_location_facts) before Ansible 2.9, returning C(ansible_facts) and C(hcloud_location_facts).
|
||||
Note that the M(hetzner.hcloud.hcloud_location_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_location_info)!
|
||||
|
||||
author:
|
||||
- Lukas Kaemmerling (@LKaemmerling)
|
||||
|
@ -128,23 +126,11 @@ class AnsibleHcloudLocationInfo(Hcloud):
|
|||
|
||||
def main():
|
||||
module = AnsibleHcloudLocationInfo.define_module()
|
||||
|
||||
is_old_facts = module._name == "hcloud_location_facts"
|
||||
if is_old_facts:
|
||||
module.deprecate(
|
||||
"The 'hcloud_location_facts' module has been renamed to 'hcloud_location_info', "
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version="2.0.0",
|
||||
collection_name="hetzner.hcloud",
|
||||
)
|
||||
|
||||
hcloud = AnsibleHcloudLocationInfo(module)
|
||||
|
||||
hcloud.get_locations()
|
||||
result = hcloud.get_result()
|
||||
if is_old_facts:
|
||||
ansible_info = {"hcloud_location_facts": result["hcloud_location_info"]}
|
||||
module.exit_json(ansible_facts=ansible_info)
|
||||
else:
|
||||
|
||||
ansible_info = {"hcloud_location_info": result["hcloud_location_info"]}
|
||||
module.exit_json(**ansible_info)
|
||||
|
||||
|
|
|
@ -277,10 +277,11 @@ class AnsibleHcloudNetworkInfo(Hcloud):
|
|||
|
||||
def main():
|
||||
module = AnsibleHcloudNetworkInfo.define_module()
|
||||
|
||||
hcloud = AnsibleHcloudNetworkInfo(module)
|
||||
|
||||
hcloud.get_networks()
|
||||
result = hcloud.get_result()
|
||||
|
||||
info = {"hcloud_network_info": result["hcloud_network_info"]}
|
||||
module.exit_json(**info)
|
||||
|
||||
|
|
|
@ -185,7 +185,6 @@ class AnsibleHcloudPrimaryIPInfo(Hcloud):
|
|||
|
||||
def main():
|
||||
module = AnsibleHcloudPrimaryIPInfo.define_module()
|
||||
|
||||
hcloud = AnsibleHcloudPrimaryIPInfo(module)
|
||||
|
||||
hcloud.get_primary_ips()
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
hcloud_server_info.py
|
|
@ -13,8 +13,6 @@ short_description: Gather infos about your Hetzner Cloud servers.
|
|||
|
||||
description:
|
||||
- Gather infos about your Hetzner Cloud servers.
|
||||
- This module was called C(hcloud_server_facts) before Ansible 2.9, returning C(ansible_facts) and C(hcloud_server_facts).
|
||||
Note that the M(hetzner.hcloud.hcloud_server_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_server_info)!
|
||||
|
||||
author:
|
||||
- Lukas Kaemmerling (@LKaemmerling)
|
||||
|
@ -215,24 +213,11 @@ class AnsibleHcloudServerInfo(Hcloud):
|
|||
|
||||
def main():
|
||||
module = AnsibleHcloudServerInfo.define_module()
|
||||
|
||||
is_old_facts = module._name == "hcloud_server_facts"
|
||||
if is_old_facts:
|
||||
module.deprecate(
|
||||
"The 'hcloud_server_facts' module has been renamed to 'hcloud_server_info', "
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version="2.0.0",
|
||||
collection_name="hetzner.hcloud",
|
||||
)
|
||||
|
||||
hcloud = AnsibleHcloudServerInfo(module)
|
||||
|
||||
hcloud.get_servers()
|
||||
result = hcloud.get_result()
|
||||
|
||||
if is_old_facts:
|
||||
ansible_info = {"hcloud_server_facts": result["hcloud_server_info"]}
|
||||
module.exit_json(ansible_facts=ansible_info)
|
||||
else:
|
||||
ansible_info = {"hcloud_server_info": result["hcloud_server_info"]}
|
||||
module.exit_json(**ansible_info)
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
hcloud_server_type_info.py
|
|
@ -13,8 +13,6 @@ short_description: Gather infos about the Hetzner Cloud server types.
|
|||
|
||||
description:
|
||||
- Gather infos about your Hetzner Cloud server types.
|
||||
- This module was called C(hcloud_server_type_facts) before Ansible 2.9, returning C(ansible_facts) and C(hcloud_server_type_facts).
|
||||
Note that the M(hetzner.hcloud.hcloud_server_type_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_server_type_info)!
|
||||
|
||||
author:
|
||||
- Lukas Kaemmerling (@LKaemmerling)
|
||||
|
@ -185,28 +183,11 @@ class AnsibleHcloudServerTypeInfo(Hcloud):
|
|||
|
||||
def main():
|
||||
module = AnsibleHcloudServerTypeInfo.define_module()
|
||||
|
||||
is_old_facts = module._name == "hcloud_server_type_facts"
|
||||
if is_old_facts:
|
||||
module.deprecate(
|
||||
"The 'hcloud_server_type_facts' module has been renamed to 'hcloud_server_type_info', "
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version="2.0.0",
|
||||
collection_name="hetzner.hcloud",
|
||||
)
|
||||
|
||||
hcloud = AnsibleHcloudServerTypeInfo(module)
|
||||
|
||||
hcloud.get_server_types()
|
||||
result = hcloud.get_result()
|
||||
if is_old_facts:
|
||||
ansible_info = {
|
||||
"hcloud_server_type_facts": result["hcloud_server_type_info"],
|
||||
# We keep the key with a naming mistake below to prevent a breaking changes.
|
||||
# The entire module will be removed in v2.0.0
|
||||
"hcloud_server_type_info": result["hcloud_server_type_info"],
|
||||
}
|
||||
module.exit_json(ansible_facts=ansible_info)
|
||||
else:
|
||||
|
||||
ansible_info = {"hcloud_server_type_info": result["hcloud_server_type_info"]}
|
||||
module.exit_json(**ansible_info)
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
hcloud_ssh_key_info.py
|
|
@ -10,8 +10,6 @@ module: hcloud_ssh_key_info
|
|||
short_description: Gather infos about your Hetzner Cloud ssh_keys.
|
||||
description:
|
||||
- Gather facts about your Hetzner Cloud ssh_keys.
|
||||
- This module was called C(hcloud_ssh_key_facts) before Ansible 2.9, returning C(ansible_facts) and C(hcloud_ssh_key_facts).
|
||||
Note that the M(hetzner.hcloud.hcloud_ssh_key_info) module no longer returns C(ansible_facts) and the value was renamed to C(hcloud_ssh_key_info)!
|
||||
author:
|
||||
- Christopher Schmitt (@cschmitt-hcloud)
|
||||
options:
|
||||
|
@ -138,24 +136,11 @@ class AnsibleHcloudSSHKeyInfo(Hcloud):
|
|||
|
||||
def main():
|
||||
module = AnsibleHcloudSSHKeyInfo.define_module()
|
||||
|
||||
is_old_facts = module._name == "hcloud_ssh_key_facts"
|
||||
if is_old_facts:
|
||||
module.deprecate(
|
||||
"The 'hcloud_ssh_key_facts' module has been renamed to 'hcloud_ssh_key_info', "
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version="2.0.0",
|
||||
collection_name="hetzner.hcloud",
|
||||
)
|
||||
|
||||
hcloud = AnsibleHcloudSSHKeyInfo(module)
|
||||
|
||||
hcloud.get_ssh_keys()
|
||||
result = hcloud.get_result()
|
||||
|
||||
if is_old_facts:
|
||||
ansible_info = {"hcloud_ssh_key_facts": result["hcloud_ssh_key_info"]}
|
||||
module.exit_json(ansible_facts=ansible_info)
|
||||
else:
|
||||
ansible_info = {"hcloud_ssh_key_info": result["hcloud_ssh_key_info"]}
|
||||
module.exit_json(**ansible_info)
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
hcloud_volume_info.py
|
|
@ -155,24 +155,11 @@ class AnsibleHcloudVolumeInfo(Hcloud):
|
|||
|
||||
def main():
|
||||
module = AnsibleHcloudVolumeInfo.define_module()
|
||||
|
||||
is_old_facts = module._name == "hcloud_volume_facts"
|
||||
if is_old_facts:
|
||||
module.deprecate(
|
||||
"The 'hcloud_volume_facts' module has been renamed to 'hcloud_volume_info', "
|
||||
"and the renamed one no longer returns ansible_facts",
|
||||
version="2.0.0",
|
||||
collection_name="hetzner.hcloud",
|
||||
)
|
||||
|
||||
hcloud = AnsibleHcloudVolumeInfo(module)
|
||||
|
||||
hcloud.get_volumes()
|
||||
result = hcloud.get_result()
|
||||
if is_old_facts:
|
||||
ansible_info = {"hcloud_volume_facts": result["hcloud_volume_info"]}
|
||||
module.exit_json(ansible_facts=ansible_info)
|
||||
else:
|
||||
|
||||
ansible_info = {"hcloud_volume_info": result["hcloud_volume_info"]}
|
||||
module.exit_json(**ansible_info)
|
||||
|
||||
|
|
Loading…
Reference in a new issue