-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
51 lines (42 loc) · 1.18 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
language: python
# python: "2.7"
services: docker
# Use the new container infrastructure
sudo: false
# Install ansible
addons:
apt:
packages:
- python-pip
env:
global:
- ROLE_NAME: firewalld
matrix:
- MOLECULE_DISTRO: centos:7
- MOLECULE_DISTRO: centos:8
# Fedora 29 has problem with ip6tables kernel module
# - MOLECULE_DISTRO: fedora:29
# - MOLECULE_DISTRO: fedora:30
- MOLECULE_DISTRO: fedora:31
# - MOLECULE_DISTRO: archlinux
install:
# Install ansible
- pip install ansible ansible-lint 'molecule[docker]'
# Check ansible version
- ansible --version
# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' >ansible.cfg
before_script:
# Use actual Ansible Galaxy role name for the project directory.
- cd ../
- mv ansible-role-$ROLE_NAME ryandaniels.$ROLE_NAME
- cd ryandaniels.$ROLE_NAME
script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
# - molecule test
- molecule test --destroy=never && molecule test --scenario-name second-change
# - molecule destroy
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/