2017-12-11 15:48:35 +01:00
|
|
|
- name: Cloudscale floating IP tests
|
|
|
|
block:
|
|
|
|
- name: Create a server
|
|
|
|
cloudscale_server:
|
2019-03-12 17:53:49 +01:00
|
|
|
name: '{{ cloudscale_resource_prefix }}-test01'
|
2017-12-11 15:48:35 +01:00
|
|
|
flavor: '{{ cloudscale_test_flavor }}'
|
|
|
|
image: '{{ cloudscale_test_image }}'
|
|
|
|
ssh_keys: '{{ cloudscale_test_ssh_key }}'
|
|
|
|
register: test01
|
|
|
|
|
|
|
|
- name: Create a second server
|
|
|
|
cloudscale_server:
|
2019-03-12 17:53:49 +01:00
|
|
|
name: '{{ cloudscale_resource_prefix }}-test02'
|
2017-12-11 15:48:35 +01:00
|
|
|
flavor: '{{ cloudscale_test_flavor }}'
|
|
|
|
image: '{{ cloudscale_test_image }}'
|
|
|
|
ssh_keys: '{{ cloudscale_test_ssh_key }}'
|
|
|
|
register: test02
|
|
|
|
|
|
|
|
- include_tasks: floating_ip.yml
|
2019-06-03 10:43:32 +02:00
|
|
|
loop:
|
2019-03-12 17:53:49 +01:00
|
|
|
- { 'ip_version': 4, 'reverse_ptr': '{{ cloudscale_resource_prefix }}-4.example.com' }
|
|
|
|
- { 'ip_version': 6, 'reverse_ptr': '{{ cloudscale_resource_prefix }}-6.example.com' }
|
2017-12-11 15:48:35 +01:00
|
|
|
- { 'ip_version': 6, 'prefix_length': 56 }
|
|
|
|
|
2019-03-15 10:50:09 +01:00
|
|
|
- import_tasks: unassigned.yml
|
|
|
|
|
2017-12-11 15:48:35 +01:00
|
|
|
always:
|
2019-03-12 17:53:49 +01:00
|
|
|
- import_role:
|
|
|
|
name: cloudscale_common
|
|
|
|
tasks_from: cleanup_servers
|
|
|
|
- import_role:
|
|
|
|
name: cloudscale_common
|
|
|
|
tasks_from: cleanup_floating_ips
|