summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYanis Guenane <yanis@guenane.org>2018-07-17 14:05:41 +0200
committerYanis Guenane <yanis@guenane.org>2018-07-17 14:05:41 +0200
commit58df96ff7ede61aa217acc98206235c36b23e9b8 (patch)
tree6a66a6e0caf462d2020c0ac17e2411afafe529f1
parentffe0eac858ed4d866c45ff8fa80c58c11d70722b (diff)
Misc
Change-Id: Ieb7dc19a48ebb955c504b49994ee5f157240730a
-rw-r--r--tasks/amazon/main.yml4
-rw-r--r--tasks/digitalocean/main.yml8
-rw-r--r--tests/inventory/hosts2
-rw-r--r--tests/main.yml5
4 files changed, 5 insertions, 14 deletions
diff --git a/tasks/amazon/main.yml b/tasks/amazon/main.yml
index b49eddf..8e340a0 100644
--- a/tasks/amazon/main.yml
+++ b/tasks/amazon/main.yml
@@ -1,8 +1,8 @@
---
-- name: Create volume
+- name: Manage volume
ec2_vol:
name: '{{ cloud_volume_name }}'
volume_size: '{{ cloud_volume_size }}'
region: '{{ cloud_volume_region.split(":")[0] }}'
- state: '{{ cloud_volume_state|default("present") }}'
zone: '{{ cloud_volume_region.split(":")[1] }}'
+ state: '{{ cloud_volume_state|default("present") }}'
diff --git a/tasks/digitalocean/main.yml b/tasks/digitalocean/main.yml
deleted file mode 100644
index 6dcece9..0000000
--- a/tasks/digitalocean/main.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-- name: Create volume
- digital_ocean_block_storage:
- volume_name: '{{ cloud_volume_name }}'
- command: create
- block_size: '{{ cloud_volume_size }}'
- region: '{{ cloud_volume_region }}'
- state: '{{ cloud_volume_state|default("present") }}'
diff --git a/tests/inventory/hosts b/tests/inventory/hosts
index 83fa54a..d9bf803 100644
--- a/tests/inventory/hosts
+++ b/tests/inventory/hosts
@@ -1,4 +1,4 @@
-digitalocean
amazon
+digitalocean
openstack
vultr
diff --git a/tests/main.yml b/tests/main.yml
index 5d1a0f5..1976186 100644
--- a/tests/main.yml
+++ b/tests/main.yml
@@ -7,16 +7,15 @@
- name: Running tests for '{{ hostvars.localhost.host }}'
hosts: '{{ hostvars.localhost.host }}'
+ vars:
+ ansible_cloud_provider: "{{ lookup('env', 'ANSIBLE_CLOUD_PROVIDER') }}"
tasks:
- name: Create volume
include_role:
name: ansible-role-cloud-volume
- vars:
- ansible_cloud_provider: "{{ lookup('env', 'ANSIBLE_CLOUD_PROVIDER') }}"
- name: Delete volume
include_role:
name: ansible-role-cloud-volume
vars:
- ansible_cloud_provider: "{{ lookup('env', 'ANSIBLE_CLOUD_PROVIDER') }}"
cloud_volume_state: absent