-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy path.travis.yml
29 lines (26 loc) · 1.03 KB
/
.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
28
29
---
# Define the language and versions used. The CI system will create
# a Python virtualenv for each Python version to test it. It's also
# helpful to identify the base OS (jammy is Ubuntu 22.04) to use.
dist: "jammy"
language: "python"
python:
- "3.10.5"
# 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:
- "yamllint --strict *.yml"
- "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"