Merge pull request #169 from Jakuje/rip-travis

Remove travis configuration and update readme with new badges
This commit is contained in:
Matt Willsher 2021-08-18 04:32:53 +01:00 committed by GitHub
commit 8349916e52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 123 deletions

View file

@ -1,121 +0,0 @@
---
os: linux
dist: focal
language: python
addons:
apt_packages:
- yamllint
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
before_install:
- sudo -H pip3 install ansible
install:
# Add ansible.cfg to pick up roles path.
- "{ echo '[defaults]'; echo 'roles_path = ../'; echo 'deprecation_warnings=False'; } >> ansible.cfg"
script:
# Test 0a: Check the roles syntax.
- "ANSIBLE_FORCE_COLOR=1 ansible-playbook -i tests/inventory tests/tests_default.yml --syntax-check"
# Test 0b: Run yamllint with galaxy configuration to avoid quality score penalty
- wget https://raw.githubusercontent.com/ansible/galaxy/devel/galaxy/importer/linters/yamllint.yaml
- "yamllint -c yamllint.yaml **/*.yml"
# Test 0.5: OS defaults: Travis images have heavily updated (even with invalid configuration options)
# sshd_config so it does not make sense to test OS defaults here
# Test 1a: Run the role
- "ANSIBLE_FORCE_COLOR=1 ansible-playbook -i tests/inventory tests/tests_default.yml --connection=local --become -v"
# Test 1b: Run the role through include (skipping backup)
- "ANSIBLE_FORCE_COLOR=1 ansible-playbook -i tests/inventory tests/tests_default_include.yml -e sshd_test_backup_skip=yes --connection=local --become -v"
# Test 2: Run the role/playbook again, checking to make sure it's idempotent (skipping backup)
- >
ANSIBLE_FORCE_COLOR=1 ansible-playbook -i tests/inventory tests/tests_default.yml --connection=local -e sshd_test_backup_skip=yes --become | grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)
# Test 3: Check we can set arbitrary configuration options
- >
ANSIBLE_FORCE_COLOR=1 ansible-playbook -i tests/inventory tests/tests_set_common.yml --connection=local --become -v
&& (echo 'Common variables test: pass' && exit 0)
|| (echo 'Common variables test: fail' && exit 1)
# Test 4: Check if we set uncommon or unsupported configuration option, it will not fail hard
- >
ANSIBLE_FORCE_COLOR=1 ansible-playbook -i tests/inventory tests/tests_set_uncommon.yml --connection=local --become -v
&& (echo 'Uncommon configuration test: pass' && exit 0)
|| (echo 'Uncommon configuration test: fail' && exit 1)
# Test 5a: Make sure we can modify other files, for example for inclusion
# in the main sshd_config or second sshd service
- >
ANSIBLE_FORCE_COLOR=1 ansible-playbook -i tests/inventory tests/tests_alternative_file.yml --connection=local --become -v
&& (echo 'Alternative configuration file test: pass' && exit 0)
|| (echo 'Alternative configuration file test: fail' && exit 1)
# Test 5b: Make sure we can modify other files, for example for inclusion
# in the main sshd_config or second sshd service using the old invocation
- >
ANSIBLE_FORCE_COLOR=1 ansible-playbook -i tests/inventory tests/tests_alternative_file_role.yml --connection=local --become -v
&& (echo 'Alternative configuration file role test: pass' && exit 0)
|| (echo 'Alternative configuration file role test: fail' && exit 1)
# Test 6: Test match blocks generators
- >
ANSIBLE_FORCE_COLOR=1 ansible-playbook -i tests/inventory tests/tests_match.yml --connection=local --become -v
&& (echo 'Match blocks test: pass' && exit 0)
|| (echo 'Match blocks test: fail' && exit 1)
# Test 7: Test match blocks generators with iteration
- >
ANSIBLE_FORCE_COLOR=1 ansible-playbook -i tests/inventory tests/tests_match_iterate.yml --connection=local --become -v
&& (echo 'Match blocks with iteration test: pass' && exit 0)
|| (echo 'Match blocks with iteration test: fail' && exit 1)
# Test 8a: Test hostkeys can be generated by this role
- >
ANSIBLE_FORCE_COLOR=1 ansible-playbook -i tests/inventory tests/tests_hostkeys.yml --connection=local --become -v
&& (echo 'Hostkeys test: pass' && exit 0)
|| (echo 'Hostkeys test: fail' && exit 1)
# Test 8b: Test hostkeys can be generated by this role using old invocation
- >
ANSIBLE_FORCE_COLOR=1 ansible-playbook -i tests/inventory tests/tests_hostkeys_role.yml --connection=local --become -v
&& (echo 'Hostkeys role test: pass' && exit 0)
|| (echo 'Hostkeys role test: fail' && exit 1)
# Test 9: Test missing hostkeys
- >
ANSIBLE_FORCE_COLOR=1 ansible-playbook -i tests/inventory tests/tests_hostkeys_missing.yml --connection=local --become -v
&& (echo 'Missing hostkeys test: pass' && exit 0)
|| (echo 'Missing hostkeys test: fail' && exit 1)
# Test 10: Test sshd_enable has effect
- >
ANSIBLE_FORCE_COLOR=1 ansible-playbook -i tests/inventory tests/tests_sshd_enable.yml --connection=local --become -v
&& (echo 'Test sshd_enable: pass' && exit 0)
|| (echo 'Test sshd_enable: fail' && exit 1)
# Test 11: Test variable precedence
- >
ANSIBLE_FORCE_COLOR=1 ansible-playbook -i tests/inventory tests/tests_precedence.yml --connection=local --become -v
&& (echo 'Variable precedence test: pass' && exit 0)
|| (echo 'Variable precedence test: fail' && exit 1)
# Test 12: Verify backups are created
- >
ANSIBLE_FORCE_COLOR=1 ansible-playbook -i tests/inventory tests/tests_backup.yml --connection=local --become -v
&& (echo 'Backup test: pass' && exit 0)
|| (echo 'Backup test: fail' && exit 1)
# Test 13: Verify configuration namespace
- >
ANSIBLE_FORCE_COLOR=1 ansible-playbook -i tests/inventory tests/tests_config_namespace.yml --connection=local --become -v
&& (echo 'Namespace test: pass' && exit 0)
|| (echo 'Namespace test: fail' && exit 1)

View file

@ -1,7 +1,8 @@
OpenSSH Server
==============
[![Build Status](https://travis-ci.org/willshersystems/ansible-sshd.svg?branch=master)](https://travis-ci.org/willshersystems/ansible-sshd) [![Ansible Galaxy](http://img.shields.io/badge/galaxy-willshersystems.sshd-660198.svg?style=flat)](https://galaxy.ansible.com/willshersystems/sshd/)
[![Ansible Lint](https://github.com/willshersystems/ansible-sshd/actions/workflows/ansible-lint.yml/badge.svg)](https://github.com/willshersystems/ansible-sshd/actions/workflows/ansible-lint.yml)
[![Ansible Galaxy](http://img.shields.io/badge/galaxy-willshersystems.sshd-660198.svg?style=flat)](https://galaxy.ansible.com/willshersystems/sshd/)
This role configures the OpenSSH daemon. It:
@ -29,10 +30,18 @@ Requirements
Tested on:
* Ubuntu precise, trusty, xenial, bionic, focal
* [![Run tests on Ubuntu latest](https://github.com/willshersystems/ansible-sshd/actions/workflows/ansible-ubuntu.yml/badge.svg)](https://github.com/willshersystems/ansible-sshd/actions/workflows/ansible-ubuntu.yml)
* Debian wheezy, jessie, stretch, buster, bullseye
* FreeBSD 10.1
* [![Run tests on Debian bullseye (11)](https://github.com/willshersystems/ansible-sshd/actions/workflows/ansible-debian-bullseye.yml/badge.svg)](https://github.com/willshersystems/ansible-sshd/actions/workflows/ansible-debian-bullseye.yml)
* [![Run tests on Debian buster (10)](https://github.com/willshersystems/ansible-sshd/actions/workflows/ansible-debian-buster.yml/badge.svg)](https://github.com/willshersystems/ansible-sshd/actions/workflows/ansible-debian-buster.yml)
* [![Run tests on Debian stretch (9)](https://github.com/willshersystems/ansible-sshd/actions/workflows/ansible-debian-stretch.yml/badge.svg)](https://github.com/willshersystems/ansible-sshd/actions/workflows/ansible-debian-stretch.yml)
* EL 6, 7, 8, 9 derived distributions
* [![Run tests on CentOS 8](https://github.com/willshersystems/ansible-sshd/actions/workflows/ansible-centos8.yml/badge.svg)](https://github.com/willshersystems/ansible-sshd/actions/workflows/ansible-centos8.yml)
* [![Run tests on CentOS 7](https://github.com/willshersystems/ansible-sshd/actions/workflows/ansible-centos7.yml/badge.svg)](https://github.com/willshersystems/ansible-sshd/actions/workflows/ansible-centos7.yml)
* [![Run tests on CentOS 6](https://github.com/willshersystems/ansible-sshd/actions/workflows/ansible-centos6.yml/badge.svg)](https://github.com/willshersystems/ansible-sshd/actions/workflows/ansible-centos6.yml)
* Fedora 31, 32, 33, 34
* [![Run tests on Fedora latest](https://github.com/willshersystems/ansible-sshd/actions/workflows/ansible-fedora.yml/badge.svg)](https://github.com/willshersystems/ansible-sshd/actions/workflows/ansible-fedora.yml)
* FreeBSD 10.1
* OpenBSD 6.0
* AIX 7.1, 7.2