diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 0000000..ab3522c --- /dev/null +++ b/.rubocop.yml @@ -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 diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..477f615 --- /dev/null +++ b/.travis.yml @@ -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/ diff --git a/README.md b/README.md index 261f0f4..737db8d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # 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) +[![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) Install and configure Fail2ban diff --git a/test/integration/fail2ban/serverspec/fail2ban_spec.rb b/test/integration/fail2ban/serverspec/fail2ban_spec.rb index adff4e7..6b32fa8 100644 --- a/test/integration/fail2ban/serverspec/fail2ban_spec.rb +++ b/test/integration/fail2ban/serverspec/fail2ban_spec.rb @@ -2,6 +2,11 @@ require 'serverspec' set :backend, :exec +puts +puts '================================' +puts %x(ansible --version) +puts '================================' + describe package('fail2ban') do it { should be_installed } end