mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Add some extra vars and create a dependent role prepare_rax_tests
This commit is contained in:
parent
5a862328f0
commit
dab9c30584
13 changed files with 97 additions and 98 deletions
|
@ -115,7 +115,10 @@ gce: $(CREDENTIALS_FILE)
|
|||
CLOUD_RESOURCE_PREFIX="$(CLOUD_RESOURCE_PREFIX)" make gce_cleanup ; \
|
||||
exit $$RC;
|
||||
|
||||
rackspace: $(CREDENTIALS_FILE)
|
||||
rackspace_prepare:
|
||||
ansible-playbook rackspace.yml -i $(INVENTORY) -e @$(VARS_FILE) $(CREDENTIALS_ARG) -e "resource_prefix=$(CLOUD_RESOURCE_PREFIX)" -v $(TEST_FLAGS) -t prepare
|
||||
|
||||
rackspace: rackspace_prepare $(CREDENTIALS_FILE)
|
||||
ansible-playbook rackspace.yml -i $(INVENTORY) -e @$(VARS_FILE) $(CREDENTIALS_ARG) -e "resource_prefix=$(CLOUD_RESOURCE_PREFIX)" -v $(TEST_FLAGS) ; \
|
||||
RC=$$? ; \
|
||||
CLOUD_RESOURCE_PREFIX="$(CLOUD_RESOURCE_PREFIX)" make rackspace_cleanup ; \
|
||||
|
|
|
@ -5,6 +5,11 @@
|
|||
tags:
|
||||
- rackspace
|
||||
roles:
|
||||
- role: prepare_rax_tests
|
||||
tags:
|
||||
- prepare
|
||||
- prepare_rax_tests
|
||||
|
||||
- role: test_rax
|
||||
tags: test_rax
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
rackspace_region: IAD
|
||||
rackspace_image_human_id: "ubuntu-1404-lts-trusty-tahr-pvhvm"
|
||||
rackspace_image_id: "753a7703-4960-488b-aab4-a3cdd4b276dc"
|
||||
rackspace_image_name: "Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)"
|
||||
rackspace_flavor: "performance1-1"
|
||||
resource_prefix: ansible-testing
|
11
test/integration/roles/prepare_rax_tests/tasks/main.yml
Normal file
11
test/integration/roles/prepare_rax_tests/tasks/main.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
- name: Check for required variables
|
||||
assert:
|
||||
that:
|
||||
- resource_prefix is defined and resource_prefix
|
||||
- rackspace_username is defined and rackspace_username
|
||||
- rackspace_api_key is defined and rackspace_api_key
|
||||
- rackspace_region is defined and rackspace_region
|
||||
- rackspace_image_human_id is defined and rackspace_image_human_id
|
||||
- rackspace_image_id is defined and rackspace_image_id
|
||||
- rackspace_image_name is defined and rackspace_image_name
|
|
@ -1,3 +0,0 @@
|
|||
---
|
||||
rackspace_region: IAD
|
||||
resource_prefix: ansible-testing
|
3
test/integration/roles/test_rax/meta/main.yml
Normal file
3
test/integration/roles/test_rax/meta/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
dependencies:
|
||||
- prepare_tests
|
||||
- prepare_rax_tests
|
|
@ -1,12 +1,3 @@
|
|||
---
|
||||
- name: Check for required variables
|
||||
assert:
|
||||
that:
|
||||
- resource_prefix is defined and resource_prefix
|
||||
- rackspace_username is defined and rackspace_username
|
||||
- rackspace_api_key is defined and rackspace_api_key
|
||||
- rackspace_region is defined and rackspace_region
|
||||
|
||||
# ============================================================
|
||||
- name: Test rax with no args
|
||||
rax:
|
||||
|
@ -63,7 +54,7 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
image: "{{ rackspace_image_id }}"
|
||||
ignore_errors: true
|
||||
register: rax
|
||||
|
||||
|
@ -82,8 +73,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
ignore_errors: true
|
||||
register: rax
|
||||
|
||||
|
@ -102,8 +93,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-1"
|
||||
register: rax
|
||||
|
||||
|
@ -123,8 +114,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-1"
|
||||
state: absent
|
||||
wait: true
|
||||
|
@ -146,8 +137,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-2"
|
||||
wait: true
|
||||
register: rax
|
||||
|
@ -168,8 +159,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-2"
|
||||
wait: true
|
||||
register: rax
|
||||
|
@ -189,8 +180,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-2"
|
||||
state: absent
|
||||
wait: true
|
||||
|
@ -214,8 +205,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-3"
|
||||
meta:
|
||||
foo: bar
|
||||
|
@ -239,8 +230,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-3"
|
||||
meta:
|
||||
foo: bar
|
||||
|
@ -262,8 +253,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-3"
|
||||
state: absent
|
||||
meta:
|
||||
|
@ -289,8 +280,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-4"
|
||||
count: 2
|
||||
wait: true
|
||||
|
@ -310,8 +301,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-4"
|
||||
count: 2
|
||||
wait: true
|
||||
|
@ -331,8 +322,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-4"
|
||||
count: 3
|
||||
wait: true
|
||||
|
@ -352,8 +343,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-4"
|
||||
count: 3
|
||||
state: absent
|
||||
|
@ -378,8 +369,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-5-%02d"
|
||||
count: 2
|
||||
group: "{{ resource_prefix }}-5"
|
||||
|
@ -401,8 +392,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-5-%02d"
|
||||
count: 2
|
||||
group: "{{ resource_prefix }}-5"
|
||||
|
@ -428,8 +419,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-6-%02d"
|
||||
count: 2
|
||||
group: "{{ resource_prefix }}-6"
|
||||
|
@ -451,8 +442,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-6-%02d"
|
||||
count: 2
|
||||
group: "{{ resource_prefix }}-6"
|
||||
|
@ -473,8 +464,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-6-%02d"
|
||||
count: 4
|
||||
group: "{{ resource_prefix }}-6"
|
||||
|
@ -500,8 +491,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-7-%02d"
|
||||
count: 2
|
||||
exact_count: true
|
||||
|
@ -524,8 +515,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-7-%02d"
|
||||
count: 2
|
||||
exact_count: true
|
||||
|
@ -547,8 +538,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-7-%02d"
|
||||
count: 4
|
||||
exact_count: true
|
||||
|
@ -572,8 +563,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-7-%02d"
|
||||
count: 0
|
||||
exact_count: true
|
||||
|
@ -599,8 +590,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-8"
|
||||
count: 2
|
||||
group: "{{ resource_prefix }}-8"
|
||||
|
@ -623,8 +614,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-8"
|
||||
count: 2
|
||||
group: "{{ resource_prefix }}-8"
|
||||
|
@ -651,8 +642,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-9"
|
||||
count: 2
|
||||
exact_count: true
|
||||
|
@ -675,8 +666,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-9"
|
||||
count: 0
|
||||
exact_count: true
|
||||
|
@ -702,8 +693,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-10-%03d"
|
||||
count: 2
|
||||
count_offset: 10
|
||||
|
@ -727,8 +718,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-10-%03d"
|
||||
count: 0
|
||||
count_offset: 10
|
||||
|
@ -755,8 +746,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-10-%03d"
|
||||
count: 2
|
||||
count_offset: 10
|
||||
|
@ -780,8 +771,8 @@
|
|||
username: "{{ rackspace_username }}"
|
||||
api_key: "{{ rackspace_api_key }}"
|
||||
region: "{{ rackspace_region }}"
|
||||
image: ubuntu-1204-lts-precise-pangolin
|
||||
flavor: performance1-1
|
||||
image: "{{ rackspace_image_id }}"
|
||||
flavor: "{{ rackspace_flavor }}"
|
||||
name: "{{ resource_prefix }}-10-%03d"
|
||||
count: 0
|
||||
count_offset: 10
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
---
|
||||
rackspace_region: IAD
|
||||
resource_prefix: ansible-testing
|
3
test/integration/roles/test_rax_clb/meta/main.yml
Normal file
3
test/integration/roles/test_rax_clb/meta/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
dependencies:
|
||||
- prepare_tests
|
||||
- prepare_rax_tests
|
|
@ -1,12 +1,3 @@
|
|||
---
|
||||
- name: Check for required variables
|
||||
assert:
|
||||
that:
|
||||
- resource_prefix is defined and resource_prefix
|
||||
- rackspace_username is defined and rackspace_username
|
||||
- rackspace_api_key is defined and rackspace_api_key
|
||||
- rackspace_region is defined and rackspace_region
|
||||
|
||||
# ============================================================
|
||||
- name: Test rax_clb with no args
|
||||
rax_clb:
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
---
|
||||
rackspace_region: IAD
|
||||
resource_prefix: ansible-testing
|
3
test/integration/roles/test_rax_clb_nodes/meta/main.yml
Normal file
3
test/integration/roles/test_rax_clb_nodes/meta/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
dependencies:
|
||||
- prepare_tests
|
||||
- prepare_rax_tests
|
|
@ -1,12 +1,3 @@
|
|||
---
|
||||
- name: Check for required variables
|
||||
assert:
|
||||
that:
|
||||
- resource_prefix is defined and resource_prefix
|
||||
- rackspace_username is defined and rackspace_username
|
||||
- rackspace_api_key is defined and rackspace_api_key
|
||||
- rackspace_region is defined and rackspace_region
|
||||
|
||||
# ============================================================
|
||||
- name: Test rax_clb_nodes with no args
|
||||
rax_clb_nodes:
|
||||
|
|
Loading…
Reference in a new issue