mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
Initial commit
This commit is contained in:
commit
aebc1b03fd
4861 changed files with 812621 additions and 0 deletions
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
- name: List all floating IPs
|
||||
uri:
|
||||
url: 'https://api.cloudscale.ch/v1/floating-ips'
|
||||
headers:
|
||||
Authorization: 'Bearer {{ cloudscale_api_token }}'
|
||||
status_code: 200
|
||||
register: floating_ip_list
|
||||
|
||||
- name: Remove all floating IPs created by this test run
|
||||
cloudscale_floating_ip:
|
||||
ip: '{{ item.network | ipaddr("address") }}'
|
||||
state: 'absent'
|
||||
when: cloudscale_resource_prefix in (item.reverse_ptr | string )
|
||||
with_items: '{{ floating_ip_list.json }}'
|
||||
loop_control:
|
||||
label: '{{ item.reverse_ptr }} ({{ item.network }})'
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
- name: List all server groups
|
||||
uri:
|
||||
url: 'https://api.cloudscale.ch/v1/server-groups'
|
||||
headers:
|
||||
Authorization: 'Bearer {{ cloudscale_api_token }}'
|
||||
status_code: 200
|
||||
register: server_group_list
|
||||
|
||||
- name: Remove all server groups created by this test run
|
||||
cloudscale_server_group:
|
||||
uuid: '{{ item.uuid }}'
|
||||
state: absent
|
||||
when: cloudscale_resource_prefix in item.name
|
||||
with_items: '{{ server_group_list.json }}'
|
||||
loop_control:
|
||||
label: '{{ item.name }} ({{ item.uuid }})'
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
- name: List all servers
|
||||
uri:
|
||||
url: 'https://api.cloudscale.ch/v1/servers'
|
||||
headers:
|
||||
Authorization: 'Bearer {{ cloudscale_api_token }}'
|
||||
status_code: 200
|
||||
register: server_list
|
||||
|
||||
- name: Remove all servers created by this test run
|
||||
cloudscale_server:
|
||||
uuid: '{{ item.uuid }}'
|
||||
state: 'absent'
|
||||
when: cloudscale_resource_prefix in item.name
|
||||
with_items: '{{ server_list.json }}'
|
||||
loop_control:
|
||||
label: '{{ item.name }} ({{ item.uuid }})'
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
- name: List all volumes
|
||||
uri:
|
||||
url: 'https://api.cloudscale.ch/v1/volumes'
|
||||
headers:
|
||||
Authorization: 'Bearer {{ cloudscale_api_token }}'
|
||||
status_code: 200
|
||||
register: volume_list
|
||||
|
||||
- name: Remove all volumes created by this test run
|
||||
cloudscale_volume:
|
||||
uuid: '{{ item.uuid }}'
|
||||
state: 'absent'
|
||||
when: cloudscale_resource_prefix in item.name
|
||||
with_items: '{{ volume_list.json }}'
|
||||
loop_control:
|
||||
label: '{{ item.name }} ({{ item.uuid }})'
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
# Password to use for test server
|
||||
# This has to be set as a fact, otherwise a new password will be generated
|
||||
# on every variable access.
|
||||
- set_fact:
|
||||
cloudscale_test_password: "{{ lookup('password', '/dev/null length=15 chars=ascii_letters') }}"
|
Loading…
Add table
Add a link
Reference in a new issue