mirror of
https://github.com/ansible-collections/hetzner.hcloud.git
synced 2026-02-04 08:01:49 +00:00
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:
parent
0dc857830d
commit
fb8c2a9f58
28 changed files with 56 additions and 56 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 }}"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 }}"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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 }}"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue