1
0
Fork 0
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:
Matt Martz 2015-01-16 10:04:05 -06:00
parent 5a862328f0
commit dab9c30584
13 changed files with 97 additions and 98 deletions

View file

@ -115,7 +115,10 @@ gce: $(CREDENTIALS_FILE)
CLOUD_RESOURCE_PREFIX="$(CLOUD_RESOURCE_PREFIX)" make gce_cleanup ; \ CLOUD_RESOURCE_PREFIX="$(CLOUD_RESOURCE_PREFIX)" make gce_cleanup ; \
exit $$RC; 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) ; \ ansible-playbook rackspace.yml -i $(INVENTORY) -e @$(VARS_FILE) $(CREDENTIALS_ARG) -e "resource_prefix=$(CLOUD_RESOURCE_PREFIX)" -v $(TEST_FLAGS) ; \
RC=$$? ; \ RC=$$? ; \
CLOUD_RESOURCE_PREFIX="$(CLOUD_RESOURCE_PREFIX)" make rackspace_cleanup ; \ CLOUD_RESOURCE_PREFIX="$(CLOUD_RESOURCE_PREFIX)" make rackspace_cleanup ; \

View file

@ -5,6 +5,11 @@
tags: tags:
- rackspace - rackspace
roles: roles:
- role: prepare_rax_tests
tags:
- prepare
- prepare_rax_tests
- role: test_rax - role: test_rax
tags: test_rax tags: test_rax

View file

@ -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

View 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

View file

@ -1,3 +0,0 @@
---
rackspace_region: IAD
resource_prefix: ansible-testing

View file

@ -0,0 +1,3 @@
dependencies:
- prepare_tests
- prepare_rax_tests

View file

@ -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 - name: Test rax with no args
rax: rax:
@ -63,7 +54,7 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
ignore_errors: true ignore_errors: true
register: rax register: rax
@ -82,8 +73,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
ignore_errors: true ignore_errors: true
register: rax register: rax
@ -102,8 +93,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-1" name: "{{ resource_prefix }}-1"
register: rax register: rax
@ -123,8 +114,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-1" name: "{{ resource_prefix }}-1"
state: absent state: absent
wait: true wait: true
@ -146,8 +137,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-2" name: "{{ resource_prefix }}-2"
wait: true wait: true
register: rax register: rax
@ -168,8 +159,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-2" name: "{{ resource_prefix }}-2"
wait: true wait: true
register: rax register: rax
@ -189,8 +180,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-2" name: "{{ resource_prefix }}-2"
state: absent state: absent
wait: true wait: true
@ -214,8 +205,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-3" name: "{{ resource_prefix }}-3"
meta: meta:
foo: bar foo: bar
@ -239,8 +230,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-3" name: "{{ resource_prefix }}-3"
meta: meta:
foo: bar foo: bar
@ -262,8 +253,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-3" name: "{{ resource_prefix }}-3"
state: absent state: absent
meta: meta:
@ -289,8 +280,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-4" name: "{{ resource_prefix }}-4"
count: 2 count: 2
wait: true wait: true
@ -310,8 +301,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-4" name: "{{ resource_prefix }}-4"
count: 2 count: 2
wait: true wait: true
@ -331,8 +322,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-4" name: "{{ resource_prefix }}-4"
count: 3 count: 3
wait: true wait: true
@ -352,8 +343,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-4" name: "{{ resource_prefix }}-4"
count: 3 count: 3
state: absent state: absent
@ -378,8 +369,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-5-%02d" name: "{{ resource_prefix }}-5-%02d"
count: 2 count: 2
group: "{{ resource_prefix }}-5" group: "{{ resource_prefix }}-5"
@ -401,8 +392,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-5-%02d" name: "{{ resource_prefix }}-5-%02d"
count: 2 count: 2
group: "{{ resource_prefix }}-5" group: "{{ resource_prefix }}-5"
@ -428,8 +419,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-6-%02d" name: "{{ resource_prefix }}-6-%02d"
count: 2 count: 2
group: "{{ resource_prefix }}-6" group: "{{ resource_prefix }}-6"
@ -451,8 +442,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-6-%02d" name: "{{ resource_prefix }}-6-%02d"
count: 2 count: 2
group: "{{ resource_prefix }}-6" group: "{{ resource_prefix }}-6"
@ -473,8 +464,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-6-%02d" name: "{{ resource_prefix }}-6-%02d"
count: 4 count: 4
group: "{{ resource_prefix }}-6" group: "{{ resource_prefix }}-6"
@ -500,8 +491,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-7-%02d" name: "{{ resource_prefix }}-7-%02d"
count: 2 count: 2
exact_count: true exact_count: true
@ -524,8 +515,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-7-%02d" name: "{{ resource_prefix }}-7-%02d"
count: 2 count: 2
exact_count: true exact_count: true
@ -547,8 +538,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-7-%02d" name: "{{ resource_prefix }}-7-%02d"
count: 4 count: 4
exact_count: true exact_count: true
@ -572,8 +563,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-7-%02d" name: "{{ resource_prefix }}-7-%02d"
count: 0 count: 0
exact_count: true exact_count: true
@ -599,8 +590,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-8" name: "{{ resource_prefix }}-8"
count: 2 count: 2
group: "{{ resource_prefix }}-8" group: "{{ resource_prefix }}-8"
@ -623,8 +614,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-8" name: "{{ resource_prefix }}-8"
count: 2 count: 2
group: "{{ resource_prefix }}-8" group: "{{ resource_prefix }}-8"
@ -651,8 +642,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-9" name: "{{ resource_prefix }}-9"
count: 2 count: 2
exact_count: true exact_count: true
@ -675,8 +666,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-9" name: "{{ resource_prefix }}-9"
count: 0 count: 0
exact_count: true exact_count: true
@ -702,8 +693,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-10-%03d" name: "{{ resource_prefix }}-10-%03d"
count: 2 count: 2
count_offset: 10 count_offset: 10
@ -727,8 +718,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-10-%03d" name: "{{ resource_prefix }}-10-%03d"
count: 0 count: 0
count_offset: 10 count_offset: 10
@ -755,8 +746,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-10-%03d" name: "{{ resource_prefix }}-10-%03d"
count: 2 count: 2
count_offset: 10 count_offset: 10
@ -780,8 +771,8 @@
username: "{{ rackspace_username }}" username: "{{ rackspace_username }}"
api_key: "{{ rackspace_api_key }}" api_key: "{{ rackspace_api_key }}"
region: "{{ rackspace_region }}" region: "{{ rackspace_region }}"
image: ubuntu-1204-lts-precise-pangolin image: "{{ rackspace_image_id }}"
flavor: performance1-1 flavor: "{{ rackspace_flavor }}"
name: "{{ resource_prefix }}-10-%03d" name: "{{ resource_prefix }}-10-%03d"
count: 0 count: 0
count_offset: 10 count_offset: 10

View file

@ -1,3 +0,0 @@
---
rackspace_region: IAD
resource_prefix: ansible-testing

View file

@ -0,0 +1,3 @@
dependencies:
- prepare_tests
- prepare_rax_tests

View file

@ -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 - name: Test rax_clb with no args
rax_clb: rax_clb:

View file

@ -1,3 +0,0 @@
---
rackspace_region: IAD
resource_prefix: ansible-testing

View file

@ -0,0 +1,3 @@
dependencies:
- prepare_tests
- prepare_rax_tests

View file

@ -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 - name: Test rax_clb_nodes with no args
rax_clb_nodes: rax_clb_nodes: