-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from sbaerlocher/fixed/many
fixed
- Loading branch information
Showing
6 changed files
with
94 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,31 @@ | ||
--- | ||
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: snmp | ||
matrix: | ||
- MOLECULE_DISTRO: centos6 | ||
- MOLECULE_DISTRO: debian10 | ||
|
||
install: | ||
# Install ansible | ||
- pip install ansible | ||
|
||
# Install ansible-lint | ||
- pip install ansible-lint | ||
|
||
# Install yamllint | ||
- pip install yamllint | ||
|
||
# Install tests rules | ||
- git submodule add https://github.com/arillso/tests tests | ||
- pip install docker molecule yamllint ansible-lint flake8 | ||
- git clone https://github.com/arillso/tests molecule/default/lint | ||
|
||
before_script: | ||
# Check ansible version | ||
- ansible --version | ||
|
||
# Check ansible-lint version | ||
- ansible-lint --version | ||
|
||
# Check ansible-lint version | ||
- yamllint --version | ||
- cd ../ | ||
- mv ansible.$ROLE_NAME sbaerlocher.$ROLE_NAME | ||
- cd sbaerlocher.$ROLE_NAME | ||
|
||
script: | ||
# Ansible Lint check | ||
- ansible-lint -R -r tests/ansible-lint/ . | ||
|
||
# YAML Lint check | ||
- yamllint -c tests/yaml-lint/yamllint.yml . | ||
- molecule test | ||
|
||
notifications: | ||
webhooks: https://galaxy.ansible.com/api/v1/notifications/ | ||
webhooks: | ||
urls: | ||
- https://galaxy.ansible.com/api/v1/notifications/ | ||
on_success: always | ||
email: | ||
on_success: never | ||
on_failure: always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
driver: | ||
name: docker | ||
lint: | | ||
set -e | ||
yamllint . -c molecule/default/yamllint.yml | ||
platforms: | ||
- name: instance | ||
image: 'geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest' | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:ro | ||
privileged: true | ||
pre_build_image: true | ||
provisioner: | ||
name: ansible | ||
lint: | ||
name: ansible-lint | ||
playbooks: | ||
converge: ${MOLECULE_PLAYBOOK:-playbook.yml} | ||
scenario: | ||
name: default | ||
verifier: | ||
name: testinfra | ||
lint: | ||
name: flake8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
- name: Converge | ||
hosts: all | ||
roles: | ||
- role: sbaerlocher.snmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
extends: default | ||
rules: | ||
line-length: disable | ||
comments: disable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters