Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,16 @@ env:
install:
## Create Docker with Ansible modules and all dependancies
- docker build --build-arg ver_ansible=$ANSIBLE_VERSION -t juniper/pyez-ansible:travis .
- docker pull juniper/ravello-ansible:v0.1
## Install Ansible locally for Ravello and install Roles
- pip install -q ansible==$ANSIBLE_VERSION
- cd tests
- mkdir library
- git clone https://github.com/Juniper/ravello-ansible.git library/ravello-ansible
- pip install -r library/ravello-ansible/requirements.txt
- cp .travis_ansible_python.yaml group_vars/all/travis_ansible_python.yaml

script:
## Start Virtual topology on Ravello with 2 VQFX and collect IP addresses
## Anyone can connect here to see the list of applications running and see the VMs
## https://cloud.ravellosystems.com/#/GtHFbCOuKgD1pcfkvCCIgenj6DOtn3VgRLjaYipdideCsiPC1NxJitt1UHfhF0Bf/apps
- ansible-playbook -i ravello.ini pb.rav.token.create-deploy.yaml
- ansible-playbook -i ravello.ini pb.rav.token.fqdn_get.yaml
- rm group_vars/all/travis_ansible_python.yaml
- docker run -t -i -v $(pwd):/project -e "ANSIBLE_VERSION=$(echo $ANSIBLE_VERSION)" -e "TRAVIS_JOB_ID=$(echo $TRAVIS_JOB_ID)" -e "TRAVIS_COMMIT=$(echo $TRAVIS_COMMIT)" juniper/ravello-ansible:v0.1 ansible-playbook -i ravello.ini pb.rav.token.create-deploy.yaml
- docker run -t -i -v $(pwd):/project -e "ANSIBLE_VERSION=$(echo $ANSIBLE_VERSION)" -e "TRAVIS_JOB_ID=$(echo $TRAVIS_JOB_ID)" -e "TRAVIS_COMMIT=$(echo $TRAVIS_COMMIT)" juniper/ravello-ansible:v0.1 ansible-playbook -i ravello.ini pb.rav.token.fqdn_get.yaml

## Execute Tests with Docker
- docker run -t -i -v $(pwd):/project juniper/pyez-ansible:travis ansible-playbook -i ravello.ini pb.junos_ping.yaml
Expand Down
2 changes: 1 addition & 1 deletion library/junos_cli
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def main():

cli_output = dev.cli(command=args['cli'], format=args['format'] )

if dest is not None:
if args['dest'] is not None:
with open(args['dest'], 'w') as outputfile:
if args['format'] == 'text':
outputfile.write(cli_output)
Expand Down
1 change: 0 additions & 1 deletion tests/.travis_ansible_python.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion tests/ansible.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

[defaults]
hash_behaviour=merge
roles_path = /etc/ansible/roles:library/ravello-ansible/roles
roles_path = /etc/ansible/roles
Empty file removed tests/group_vars/all/donotdelete
Empty file.