chore: replace deprecated server type with cx22 (#510)

Learn more:
https://docs.hetzner.cloud/changelog#2024-06-06-old-server-types-with-shared-intel-vcpus-are-deprecated

- Updated docs with newer server types
- Use ARM server type for tests
This commit is contained in:
Jonas L 2024-06-11 15:30:47 +02:00 committed by GitHub
parent 0dc857830d
commit fb8c2a9f58
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 56 additions and 56 deletions

View file

@ -23,7 +23,7 @@ Alternatively, you may provide the API token directly as module argument:
hetzner.hcloud.server:
api_token: LRK9DAWQ1ZAEFSrCNEEzLCUwhYX1U3g7wMg4dTlkkDC96fyDuyJ39nVbVjCKSDfj
name: my-server
server_type: cx11
server_type: cx22
image: debian-12
state: present
@ -45,6 +45,6 @@ example if you want to store your API token in a vault:
- name: Create server
hetzner.hcloud.server:
name: my-server
server_type: cx11
server_type: cx22
image: debian-12
state: present

View file

@ -31,7 +31,7 @@
- name: Create servers
hetzner.hcloud.server:
name: "{{ item.name }}"
server_type: cx11
server_type: cx22
image: debian-12
labels:
kind: runners

View file

@ -28,7 +28,7 @@
- name: Create servers without public IPs
hetzner.hcloud.server:
name: "{{ item.name }}"
server_type: cx11
server_type: cx22
image: debian-12
enable_ipv4: false
enable_ipv6: false

View file

@ -19,7 +19,7 @@
- name: Create a server
hetzner.hcloud.server:
name: my-server
server_type: cx11
server_type: cx22
image: debian-12
location: fsn1
volumes:

View file

@ -11,7 +11,7 @@
- name: Create new server
hetzner.hcloud.server:
name: my-server
server_type: cx11
server_type: cx22
image: debian-12
- name: Refresh inventory

View file

@ -134,7 +134,7 @@ plugin: hetzner.hcloud.hcloud
locations:
- nbg1
types:
- cx11
- cx22
status:
- running
@ -163,8 +163,8 @@ plugin: hetzner.hcloud.hcloud
# foo: "bar"
# status: "running"
## Server Type
# type: "cx11"
# server_type: "cx11"
# type: "cx22"
# server_type: "cx22"
# architecture: "x86"
## Image
# image_id: 114690387

View file

@ -113,7 +113,7 @@ hcloud_load_balancer:
description: Name of the Load Balancer type of the Load Balancer
returned: always
type: str
sample: cx11
sample: cx22
algorithm:
description: Algorithm of the Load Balancer.
returned: always

View file

@ -73,7 +73,7 @@ hcloud_load_balancer_info:
description: Name of the Load Balancer type of the Load Balancer
returned: always
type: str
sample: cx11
sample: cx22
ipv4_address:
description: Public IPv4 address of the Load Balancer
returned: always

View file

@ -138,7 +138,7 @@ hcloud_network_info:
description: Name of the server type of the server
returned: always
type: str
sample: cx11
sample: cx22
ipv4_address:
description: Public IPv4 address of the server, None if not existing
returned: always

View file

@ -161,14 +161,14 @@ EXAMPLES = """
- name: Create a basic server
hetzner.hcloud.server:
name: my-server
server_type: cx11
server_type: cx22
image: ubuntu-22.04
state: present
- name: Create a basic server with ssh key
hetzner.hcloud.server:
name: my-server
server_type: cx11
server_type: cx22
image: ubuntu-22.04
location: fsn1
ssh_keys:
@ -178,7 +178,7 @@ EXAMPLES = """
- name: Resize an existing server
hetzner.hcloud.server:
name: my-server
server_type: cx21
server_type: cx32
upgrade_disk: true
state: present
@ -268,7 +268,7 @@ hcloud_server:
description: Name of the server type of the server
returned: always
type: str
sample: cx11
sample: cx22
ipv4_address:
description: Public IPv4 address of the server
returned: always

View file

@ -78,7 +78,7 @@ hcloud_server_info:
description: Name of the server type of the server
returned: always
type: str
sample: cx11
sample: cx22
ipv4_address:
description: Public IPv4 address of the server
returned: always

View file

@ -2,7 +2,7 @@
- name: Create test_server
hetzner.hcloud.server:
name: "{{ hcloud_server_name }}"
server_type: cx11
server_type: cax11
image: ubuntu-22.04
state: stopped
register: test_server

View file

@ -2,7 +2,7 @@
- name: Create test_server
hetzner.hcloud.server:
name: "{{ hcloud_server_name }}"
server_type: cx11
server_type: cax11
image: ubuntu-22.04
labels:
firewall: "{{ hcloud_firewall_name }}"

View file

@ -2,7 +2,7 @@
- name: Create test_server
hetzner.hcloud.server:
name: "{{ hcloud_server_name }}"
server_type: cx11
server_type: cax11
image: ubuntu-22.04
labels:
key: value

View file

@ -19,7 +19,7 @@
- name: setup server
hetzner.hcloud.server:
name: "{{ hcloud_server_name }}"
server_type: cx11
server_type: cax11
image: ubuntu-22.04
state: stopped
location: "fsn1"
@ -32,7 +32,7 @@
- name: setup another server
hetzner.hcloud.server:
name: "{{ hcloud_server_name }}2"
server_type: cx11
server_type: cax11
image: ubuntu-22.04
state: stopped
register: main_server2

View file

@ -2,7 +2,7 @@
- name: Create test_server
hetzner.hcloud.server:
name: "{{ hcloud_server_name }}"
server_type: cx11
server_type: cax11
image: ubuntu-22.04
state: stopped
register: test_server

View file

@ -2,7 +2,7 @@
- name: Create test_server
hetzner.hcloud.server:
name: "{{ hcloud_server_name }}"
server_type: cx11
server_type: cax11
image: ubuntu-22.04
state: stopped
register: test_server

View file

@ -4,7 +4,7 @@
- name: setup server
hetzner.hcloud.server:
name: "{{hcloud_server_name}}"
server_type: cx11
server_type: cax11
image: ubuntu-22.04
state: stopped
location: "fsn1"

View file

@ -2,7 +2,7 @@
- name: Create test_server
hetzner.hcloud.server:
name: "{{ hcloud_server_name }}"
server_type: cx11
server_type: cax11
image: ubuntu-22.04
state: stopped
enable_ipv4: false

View file

@ -2,7 +2,7 @@
- name: Create test_server
hetzner.hcloud.server:
name: "{{ hcloud_server_name }}"
server_type: cx11
server_type: cax11
image: ubuntu-22.04
state: present
register: test_server

View file

@ -1,7 +1,7 @@
- name: test create server with check mode
hetzner.hcloud.server:
name: "{{ hcloud_server_name }}"
server_type: cx11
server_type: cax11
image: ubuntu-22.04
state: present
register: result
@ -14,7 +14,7 @@
- name: test create server
hetzner.hcloud.server:
name: "{{ hcloud_server_name}}"
server_type: cx11
server_type: cax11
image: ubuntu-22.04
enable_ipv6: False
state: started
@ -24,7 +24,7 @@
that:
- main_server is changed
- main_server.hcloud_server.name == hcloud_server_name
- main_server.hcloud_server.server_type == "cx11"
- main_server.hcloud_server.server_type == "cax11"
- main_server.hcloud_server.status == "running"
- main_server.root_password != ""
@ -108,7 +108,7 @@
- name: test resize server running without force
hetzner.hcloud.server:
name: "{{ hcloud_server_name }}"
server_type: "cx21"
server_type: "cax21"
state: present
register: result
check_mode: true
@ -116,12 +116,12 @@
assert:
that:
- result is changed
- result.hcloud_server.server_type == "cx11"
- result.hcloud_server.server_type == "cax11"
- name: test resize server with check mode
hetzner.hcloud.server:
name: "{{ hcloud_server_name }}"
server_type: "cx21"
server_type: "cax21"
state: stopped
register: result
check_mode: true
@ -133,19 +133,19 @@
- name: test resize server without disk
hetzner.hcloud.server:
name: "{{ hcloud_server_name }}"
server_type: "cx21"
server_type: "cax21"
state: stopped
register: result
- name: verify resize server without disk
assert:
that:
- result is changed
- result.hcloud_server.server_type == "cx21"
- result.hcloud_server.server_type == "cax21"
- name: test resize server idempotence
hetzner.hcloud.server:
name: "{{ hcloud_server_name }}"
server_type: "cx21"
server_type: "cax21"
state: stopped
register: result
- name: verify resize server idempotence
@ -156,19 +156,19 @@
- name: test resize server to smaller plan
hetzner.hcloud.server:
name: "{{ hcloud_server_name }}"
server_type: "cx11"
server_type: "cax11"
state: stopped
register: result
- name: verify resize server to smaller plan
assert:
that:
- result is changed
- result.hcloud_server.server_type == "cx11"
- result.hcloud_server.server_type == "cax11"
- name: test resize server with disk
hetzner.hcloud.server:
name: "{{ hcloud_server_name }}"
server_type: "cx21"
server_type: "cax21"
upgrade_disk: true
state: stopped
register: result
@ -176,7 +176,7 @@
assert:
that:
- result is changed
- result.hcloud_server.server_type == "cx21"
- result.hcloud_server.server_type == "cax21"
- name: test enable backups with check mode
hetzner.hcloud.server:
@ -360,7 +360,7 @@
- name: test create server with ssh key
hetzner.hcloud.server:
name: "{{ hcloud_server_name}}"
server_type: cx11
server_type: cax11
image: "ubuntu-22.04"
ssh_keys:
- "{{ hcloud_ssh_key_name }}"
@ -371,7 +371,7 @@
that:
- main_server is changed
- main_server.hcloud_server.name == hcloud_server_name
- main_server.hcloud_server.server_type == "cx11"
- main_server.hcloud_server.server_type == "cax11"
- main_server.hcloud_server.status == "running"
- main_server.root_password != ""
@ -441,7 +441,7 @@
- name: test create server with rescue_mode
hetzner.hcloud.server:
name: "{{ hcloud_server_name}}"
server_type: cx11
server_type: cax11
image: "ubuntu-22.04"
ssh_keys:
- "{{ hcloud_ssh_key_name }}"
@ -453,7 +453,7 @@
that:
- main_server is changed
- main_server.hcloud_server.name == hcloud_server_name
- main_server.hcloud_server.server_type == "cx11"
- main_server.hcloud_server.server_type == "cax11"
- main_server.hcloud_server.status == "running"
- main_server.root_password != ""
- main_server.hcloud_server.rescue_enabled is sameas true
@ -470,7 +470,7 @@
- name: test create server with labels
hetzner.hcloud.server:
name: "{{ hcloud_server_name}}"
server_type: cx11
server_type: cax11
image: "ubuntu-22.04"
ssh_keys:
- "{{ hcloud_ssh_key_name }}"
@ -489,7 +489,7 @@
- name: test update server with labels
hetzner.hcloud.server:
name: "{{ hcloud_server_name}}"
server_type: cx11
server_type: cax11
image: "ubuntu-22.04"
ssh_keys:
- "{{ hcloud_ssh_key_name }}"
@ -508,7 +508,7 @@
- name: test update server with labels in other order
hetzner.hcloud.server:
name: "{{ hcloud_server_name}}"
server_type: cx11
server_type: cax11
image: "ubuntu-22.04"
ssh_keys:
- "{{ hcloud_ssh_key_name }}"

View file

@ -40,7 +40,7 @@
- name: test create server with not existing image
hetzner.hcloud.server:
name: "{{ hcloud_server_name }}"
server_type: cx11
server_type: cax11
image: my-not-existing-image-20.04
state: present
register: result

View file

@ -2,7 +2,7 @@
- name: Create test_server
hetzner.hcloud.server:
name: "{{ hcloud_server_name }}"
server_type: cx11
server_type: cax11
image: ubuntu-22.04
state: stopped
labels:
@ -12,7 +12,7 @@
- name: Create test_server2 (stopped + without ip)
hetzner.hcloud.server:
name: "{{ hcloud_server_name }}2"
server_type: cx11
server_type: cax11
image: ubuntu-22.04
state: stopped
labels:

View file

@ -18,7 +18,7 @@
- name: Create test_server
hetzner.hcloud.server:
name: "{{ hcloud_server_name }}"
server_type: cx11
server_type: cax11
image: ubuntu-22.04
state: stopped
register: test_server

View file

@ -1,7 +1,7 @@
# Copyright: (c) 2019, Hetzner Cloud GmbH <info@hetzner-cloud.de>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
---
hcloud_server_type_name: cx11
hcloud_server_type_id: 1
hcloud_server_type_name: cax11
hcloud_server_type_id: 45
hcloud_server_type_id_deprecated: 2 # cx11-ceph

View file

@ -26,7 +26,7 @@
ansible.builtin.assert:
that:
- result.hcloud_server_type_info | list | count == 1
- result.hcloud_server_type_info[0].deprecation is none # fails if cx11 is ever deprecated
- result.hcloud_server_type_info[0].deprecation is none # fails if cax11 is ever deprecated
- name: Gather hcloud_server_type_info with wrong id
hetzner.hcloud.server_type_info:

View file

@ -112,7 +112,7 @@
- name: test create server with ssh key
hetzner.hcloud.server:
name: "{{ hcloud_server_name }}"
server_type: cx11
server_type: cax11
image: "ubuntu-22.04"
ssh_keys:
- "{{ hcloud_ssh_key_name }}"

View file

@ -4,7 +4,7 @@
- name: setup server
hetzner.hcloud.server:
name: "{{hcloud_server_name}}"
server_type: cx11
server_type: cax11
image: ubuntu-22.04
state: stopped
location: "fsn1"