feat: add travis test
This commit is contained in:
parent
5d6f5efb45
commit
95756abdc4
4 changed files with 67 additions and 0 deletions
38
.rubocop.yml
Normal file
38
.rubocop.yml
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
|
||||||
|
AllCops:
|
||||||
|
Exclude:
|
||||||
|
- db/**/*
|
||||||
|
- config/**/*
|
||||||
|
- Vagrantfile
|
||||||
|
TargetRubyVersion: 2.4
|
||||||
|
|
||||||
|
Naming/AccessorMethodName:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
Lint/RescueWithoutErrorClass:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
Metrics/LineLength:
|
||||||
|
Max: 120
|
||||||
|
Metrics/CyclomaticComplexity:
|
||||||
|
Enabled: false
|
||||||
|
Metrics/PerceivedComplexity:
|
||||||
|
Enabled: false
|
||||||
|
Metrics/MethodLength:
|
||||||
|
Enabled: false
|
||||||
|
Metrics/BlockLength:
|
||||||
|
Enabled: false
|
||||||
|
Metrics/ClassLength:
|
||||||
|
Enabled: false
|
||||||
|
Metrics/AbcSize:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
Style/NumericLiteralPrefix:
|
||||||
|
Enabled: false
|
||||||
|
Style/FrozenStringLiteralComment:
|
||||||
|
Enabled: false
|
||||||
|
Style/CommandLiteral:
|
||||||
|
Enabled: true
|
||||||
|
EnforcedStyle: percent_x
|
||||||
|
Style/Documentation:
|
||||||
|
Enabled: false
|
23
.travis.yml
Normal file
23
.travis.yml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
sudo: required
|
||||||
|
language: ruby
|
||||||
|
|
||||||
|
env:
|
||||||
|
- ANSIBLE_VERSION=2.2.3.0
|
||||||
|
- ANSIBLE_VERSION=2.3.3.0
|
||||||
|
- ANSIBLE_VERSION=2.4.6.0
|
||||||
|
- ANSIBLE_VERSION=2.5.7.0
|
||||||
|
- ANSIBLE_VERSION=2.6.2.0
|
||||||
|
|
||||||
|
services:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- bundle install
|
||||||
|
|
||||||
|
script:
|
||||||
|
- kitchen conv fail2ban-debian-9
|
||||||
|
- kitchen conv fail2ban-debian-9 | grep changed=0
|
||||||
|
- kitchen verify fail2ban-debian-9
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
|
@ -1,5 +1,6 @@
|
||||||
# Ansible role: Fail2ban
|
# Ansible role: Fail2ban
|
||||||
[![Version](https://img.shields.io/badge/latest_version-1.0.0-green.svg)](https://git.yaegashi.fr/nishiki/ansible-role-fail2ban/releases)
|
[![Version](https://img.shields.io/badge/latest_version-1.0.0-green.svg)](https://git.yaegashi.fr/nishiki/ansible-role-fail2ban/releases)
|
||||||
|
[![Build Status](https://travis-ci.org/nishiki/ansible-role-fail2ban.svg?branch=master)](https://travis-ci.org/nishiki/ansible-role-fail2ban)
|
||||||
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://git.yaegashi.fr/nishiki/ansible-role-fail2ban/src/branch/master/LICENSE)
|
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://git.yaegashi.fr/nishiki/ansible-role-fail2ban/src/branch/master/LICENSE)
|
||||||
|
|
||||||
Install and configure Fail2ban
|
Install and configure Fail2ban
|
||||||
|
|
|
@ -2,6 +2,11 @@ require 'serverspec'
|
||||||
|
|
||||||
set :backend, :exec
|
set :backend, :exec
|
||||||
|
|
||||||
|
puts
|
||||||
|
puts '================================'
|
||||||
|
puts %x(ansible --version)
|
||||||
|
puts '================================'
|
||||||
|
|
||||||
describe package('fail2ban') do
|
describe package('fail2ban') do
|
||||||
it { should be_installed }
|
it { should be_installed }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue