1
0
Fork 0
mirror of https://github.com/ansible-collections/hetzner.hcloud.git synced 2026-02-04 08:01:49 +00:00

feat(server_type): return included traffic (#212)

This commit is contained in:
Julian Tölle 2023-05-15 09:40:19 +02:00 committed by GitHub
parent 24c1af2b40
commit 1cf7be0486
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

@ -21,7 +21,7 @@ options:
default: https://api.hetzner.cloud/v1
type: str
requirements:
- hcloud-python >= 1.0.0
- hcloud-python >= 1.20.0
seealso:
- name: Documentation for Hetzner Cloud API
description: Complete reference for the Hetzner Cloud API.

View file

@ -98,6 +98,11 @@ hcloud_server_type_info:
returned: always
type: str
sample: x86
included_traffic:
description: Free traffic per month in bytes
returned: always
type: int
sample: 21990232555520
"""
from ansible.module_utils.basic import AnsibleModule
@ -124,7 +129,8 @@ class AnsibleHcloudServerTypeInfo(Hcloud):
"disk": server_type.disk,
"storage_type": to_native(server_type.storage_type),
"cpu_type": to_native(server_type.cpu_type),
"architecture": to_native(server_type.architecture)
"architecture": to_native(server_type.architecture),
"included_traffic": server_type.included_traffic
})
return tmp