mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +00:00
feat: add support for ARM APIs (#208)
* feat: add architecture fields for image & server type * feat: filter images by architecture * feat: select right image by arch on server create & rebuild * feat(inventory): add architecture field to returned servers * docs: add changelog for arm features * chore: prepare v1.11.0
This commit is contained in:
parent
6a3983c9cd
commit
3c2d4df8bb
9 changed files with 94 additions and 8 deletions
|
|
@ -4,3 +4,4 @@
|
|||
hcloud_prefix: "tests"
|
||||
hcloud_test_image_name: "always-there-snapshot"
|
||||
hcloud_test_image_id: 10164049
|
||||
hcloud_test_image_name_os: "ubuntu-22.04"
|
||||
|
|
|
|||
|
|
@ -60,3 +60,34 @@
|
|||
assert:
|
||||
that:
|
||||
- result is failed
|
||||
|
||||
- name: test gather hcloud image infos with name
|
||||
hcloud_image_info:
|
||||
name: "{{ hcloud_test_image_name_os }}"
|
||||
register: hcloud_images
|
||||
- name: verify test gather hcloud image infos with name
|
||||
assert:
|
||||
that:
|
||||
- hcloud_images.hcloud_image_info | list | count == 1
|
||||
- hcloud_images.hcloud_image_info[0].architecture == "x86"
|
||||
|
||||
- name: test gather hcloud image infos with name and architecture
|
||||
hcloud_image_info:
|
||||
name: "{{ hcloud_test_image_name_os }}"
|
||||
architecture: arm
|
||||
register: hcloud_images
|
||||
- name: verify test gather hcloud image infos with name
|
||||
assert:
|
||||
that:
|
||||
- hcloud_images.hcloud_image_info | list | count == 1
|
||||
- hcloud_images.hcloud_image_info[0].architecture == "arm"
|
||||
|
||||
- name: test gather hcloud image infos with architecture
|
||||
hcloud_image_info:
|
||||
architecture: arm
|
||||
register: hcloud_images
|
||||
- name: verify test gather hcloud image infos with name
|
||||
assert:
|
||||
that:
|
||||
- hcloud_images.hcloud_image_info | selectattr('architecture','equalto','x86') | list | count == 0
|
||||
- hcloud_images.hcloud_image_info | selectattr('architecture','equalto','arm') | list | count > 2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue