forked from nickrusso42518/slt-netdevops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
27 lines (24 loc) · 983 Bytes
/
.travis.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
---
# Define the language and versions used. The CI system will create
# a Python virtualenv for each Python version to test it.
language: "python"
python:
- "3.7.3"
# Install python packages for Ansible and linters first.
# This includes upgrading pip to avoid any install/wheel problems.
# Also, install Ansible collections to interact with devices.
install:
- "pip install --upgrade pip"
- "pip install -r requirements.txt"
- "ansible-galaxy collection install -r requirements.yml"
# Execute linting to catch minor errors before running the main playbook.
# Then, run the playbook in "check" mode. If either one fails, abandon
# testing.
before_script:
- "find . -name '*.yml' | xargs yamllint --strict"
- "ansible-playbook --check ntp_config.yml"
# Perform playbook testing with on pre-existing virtual routers.
# A more complex pipeline might deploy on-demand routers ahead of time
# rather than assume they already exist.
script:
- "ansible-playbook test.yml"