Skip to content

Commit

Permalink
Merge pull request #1 from avinetworks/ansible_version_check
Browse files Browse the repository at this point in the history
AV-41831 #comment Added ansible version check <2.4 for avicontroller-…
  • Loading branch information
Gaurav Rastogi authored Jul 23, 2018
2 parents 8fa23ad + f23db0d commit ff5ccfc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ script:
- 'sudo docker run --privileged --detach --volume="${PWD}":/etc/ansible/roles/role_under_test:ro ${run_opts} ${distribution}-${version}:ansible "${init}" > "${container_id}"'

# install avinetworks.avisdk dependency
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible-galaxy install avinetworks.avisdk'
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible-galaxy -c install avinetworks.avisdk'

# Ansible syntax check.
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible-playbook /etc/ansible/roles/role_under_test/tests/test.yml --syntax-check'
Expand Down
7 changes: 6 additions & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
---
# tasks file for avicontroller-azure
# tasks file for avicontroller-azure
- name: Check ansible version
when:
- ansible_version.full is version_compare('2.4', '<')
debug: msg="This role works best with ansible version 2.4 or greater. It is recomended to use latest ansible versions for best experiance."

0 comments on commit ff5ccfc

Please sign in to comment.