mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 13:50:22 -07:00
cloudscale_floating_ip module (#33181)
* Refactor cloudscale API code Move code common to all cloudscale cloud modules into a common base class. This is needed as a prepartion of the cloudscale_floating_ip module. * cloudscale_floating_ip module New cloud module to manage floating IPs on the cloudscale.ch IaaS service.
This commit is contained in:
parent
d84e0861ef
commit
a23da23491
8 changed files with 521 additions and 87 deletions
33
test/legacy/roles/cloudscale_floating_ip/tasks/main.yml
Normal file
33
test/legacy/roles/cloudscale_floating_ip/tasks/main.yml
Normal file
|
@ -0,0 +1,33 @@
|
|||
- name: Cloudscale floating IP tests
|
||||
block:
|
||||
- name: Create a server
|
||||
cloudscale_server:
|
||||
name: '{{ resource_prefix }}-test01'
|
||||
flavor: '{{ cloudscale_test_flavor }}'
|
||||
image: '{{ cloudscale_test_image }}'
|
||||
ssh_keys: '{{ cloudscale_test_ssh_key }}'
|
||||
register: test01
|
||||
|
||||
- name: Create a second server
|
||||
cloudscale_server:
|
||||
name: '{{ resource_prefix }}-test02'
|
||||
flavor: '{{ cloudscale_test_flavor }}'
|
||||
image: '{{ cloudscale_test_image }}'
|
||||
ssh_keys: '{{ cloudscale_test_ssh_key }}'
|
||||
register: test02
|
||||
|
||||
- include_tasks: floating_ip.yml
|
||||
with_items:
|
||||
- { 'ip_version': 4, 'reverse_ptr': 'my-floating-ipv4.example.com' }
|
||||
- { 'ip_version': 6 }
|
||||
- { 'ip_version': 6, 'prefix_length': 56 }
|
||||
|
||||
always:
|
||||
- name: Delete servers
|
||||
cloudscale_server:
|
||||
uuid: '{{ item.uuid }}'
|
||||
state: 'absent'
|
||||
ignore_errors: True
|
||||
with_items:
|
||||
- '{{ test01 }}'
|
||||
- '{{ test02 }}'
|
Loading…
Add table
Add a link
Reference in a new issue