# Copyright: (c) 2022, Hetzner Cloud GmbH # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) --- - name: Test create with primary ips hetzner.hcloud.server: name: "{{ hcloud_server_name }}" server_type: cpx11 datacenter: fsn1-dc14 image: ubuntu-22.04 ipv4: "{{ test_primary_ipv4_1.hcloud_primary_ip.id }}" ipv6: "{{ test_primary_ipv6.hcloud_primary_ip.id }}" ssh_keys: - "{{ hcloud_ssh_key_name }}" state: stopped register: result - name: Verify create with primary ips ansible.builtin.assert: that: - result is changed - name: Test update with primary ips hetzner.hcloud.server: name: "{{ hcloud_server_name }}" server_type: cpx11 datacenter: fsn1-dc14 image: ubuntu-22.04 ipv4: "{{ test_primary_ipv4_2.hcloud_primary_ip.id }}" ipv6: "" ssh_keys: - "{{ hcloud_ssh_key_name }}" state: stopped register: result - name: Verify update with primary ips ansible.builtin.assert: that: - result is changed