Created
October 11, 2016 20:28
-
-
Save d34dh0r53/a05d6829b65453023707a714a316b0a3 to your computer and use it in GitHub Desktop.
Version Check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - name: Get ElasticSearch version | |
| uri: | |
| url: "http://{{ hostvars[groups['elasticsearch_container'][0]]['container_address'] }}:{{ elasticsearch_http_port }}/" | |
| method: GET | |
| status_code: 200 | |
| register: escontent | |
| tags: | |
| - elasticsearch-version | |
| - debug: var=escontent.json.version.number | |
| tags: | |
| - elasticsearch-version | |
| - name: Check ElasticSearch version | |
| action: fail | |
| when: escontent.json.version.number != '1.5.4' | |
| tags: | |
| - elasticsearch-version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment