-
-
Notifications
You must be signed in to change notification settings - Fork 318
/
Copy pathtest.yml
33 lines (29 loc) · 816 Bytes
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
- hosts: localhost
gather_facts: false
vars_files:
- vars/main.yml
pre_tasks:
- name: Run the solr container.
docker_container:
image: 'ansible-for-kubernetes/solr:{{ solr_version }}'
name: '{{ container_name }}-test'
published_ports:
- 8983:8983
tasks:
- name: Verify Solr is responding.
uri:
url: http://localhost:8983/solr/collection1/admin/ping
return_content: true
register: solr_response
until:
- solr_response.json is defined
- solr_response.json.status is defined
- solr_response.json.status == 'OK'
retries: 5
delay: 5
post_tasks:
- name: Stop and remove the solr container.
docker_container:
name: '{{ container_name }}-test'
state: absent