mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.1 KiB
YAML
32 lines
1.1 KiB
YAML
7 years ago
|
- name: Cloudscale floating IP tests
|
||
|
block:
|
||
|
- name: Create a server
|
||
|
cloudscale_server:
|
||
6 years ago
|
name: '{{ cloudscale_resource_prefix }}-test01'
|
||
7 years ago
|
flavor: '{{ cloudscale_test_flavor }}'
|
||
|
image: '{{ cloudscale_test_image }}'
|
||
|
ssh_keys: '{{ cloudscale_test_ssh_key }}'
|
||
|
register: test01
|
||
|
|
||
|
- name: Create a second server
|
||
|
cloudscale_server:
|
||
6 years ago
|
name: '{{ cloudscale_resource_prefix }}-test02'
|
||
7 years ago
|
flavor: '{{ cloudscale_test_flavor }}'
|
||
|
image: '{{ cloudscale_test_image }}'
|
||
|
ssh_keys: '{{ cloudscale_test_ssh_key }}'
|
||
|
register: test02
|
||
|
|
||
|
- include_tasks: floating_ip.yml
|
||
|
with_items:
|
||
6 years ago
|
- { 'ip_version': 4, 'reverse_ptr': '{{ cloudscale_resource_prefix }}-4.example.com' }
|
||
|
- { 'ip_version': 6, 'reverse_ptr': '{{ cloudscale_resource_prefix }}-6.example.com' }
|
||
7 years ago
|
- { 'ip_version': 6, 'prefix_length': 56 }
|
||
|
|
||
|
always:
|
||
6 years ago
|
- import_role:
|
||
|
name: cloudscale_common
|
||
|
tasks_from: cleanup_servers
|
||
|
- import_role:
|
||
|
name: cloudscale_common
|
||
|
tasks_from: cleanup_floating_ips
|