Compare commits
No commits in common. "master" and "v1.0.1" have entirely different histories.
11 changed files with 15 additions and 60 deletions
|
@ -1,4 +1,3 @@
|
|||
---
|
||||
driver:
|
||||
name: docker_cli
|
||||
|
||||
|
@ -17,7 +16,7 @@ provisioner:
|
|||
platforms:
|
||||
- name: debian-9
|
||||
driver_config:
|
||||
image: "nishiki/debian9:ansible-<%= ENV['ANSIBLE_VERSION'] ? ENV['ANSIBLE_VERSION'] : '2.7' %>"
|
||||
image: nishiki/debian9:ansible-<%= ENV['ANSIBLE_VERSION'] ? ENV['ANSIBLE_VERSION'] : '2.6' %>
|
||||
command: /bin/systemd
|
||||
volume:
|
||||
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
---
|
||||
|
||||
AllCops:
|
||||
Exclude:
|
||||
- db/**/*
|
||||
|
|
|
@ -1,28 +1,21 @@
|
|||
---
|
||||
sudo: required
|
||||
language: ruby
|
||||
|
||||
env:
|
||||
- ANSIBLE_VERSION=2.4
|
||||
- ANSIBLE_VERSION=2.5
|
||||
- ANSIBLE_VERSION=2.6
|
||||
- ANSIBLE_VERSION=2.7
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
before_install:
|
||||
- bundle install
|
||||
- sudo pip install --upgrade pip
|
||||
- sudo pip install yamllint
|
||||
- sudo pip install ansible-lint
|
||||
- git clone https://github.com/ansible/galaxy-lint-rules.git
|
||||
|
||||
script:
|
||||
- kitchen conv fail2ban-debian-9
|
||||
- kitchen conv fail2ban-debian-9 | grep changed=0
|
||||
- kitchen verify fail2ban-debian-9
|
||||
- ansible-lint -r galaxy-lint-rules/rules .
|
||||
- yamllint .
|
||||
|
||||
notifications:
|
||||
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
||||
|
|
12
.yamllint
12
.yamllint
|
@ -1,12 +0,0 @@
|
|||
---
|
||||
extends: default
|
||||
|
||||
ignore: |
|
||||
.kitchen/*
|
||||
vendor/
|
||||
|
||||
rules:
|
||||
line-length:
|
||||
max: 120
|
||||
level: warning
|
||||
truthy: false
|
12
CHANGELOG.md
12
CHANGELOG.md
|
@ -1,16 +1,4 @@
|
|||
# CHANGELOG
|
||||
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## v1.1.0 (2019-01-31)
|
||||
* break: change with_items to loop
|
||||
* test: add test with ansible 2.7
|
||||
* test: add ansible-lint
|
||||
* test: add yamllint
|
||||
|
||||
## v1.0.1 (2018-08-28)
|
||||
|
||||
* feat: push in ansible galaxy
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Ansible role: Fail2ban
|
||||
[![Version](https://img.shields.io/badge/latest_version-1.1.0-green.svg)](https://git.yaegashi.fr/nishiki/ansible-role-fail2ban/releases)
|
||||
[![Version](https://img.shields.io/badge/latest_version-1.0.1-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)
|
||||
|
||||
|
@ -7,7 +7,7 @@ Install and configure Fail2ban
|
|||
|
||||
## Requirements
|
||||
|
||||
* Ansible >= 2.5
|
||||
* Ansible >= 2.4
|
||||
* Debian Stretch
|
||||
|
||||
## Role variables
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
---
|
||||
fail2ban_blocktype: DROP
|
||||
fail2ban_bantime: 600
|
||||
fail2ban_findtime: 600
|
||||
|
|
|
@ -1,5 +1,2 @@
|
|||
---
|
||||
- name: restart fail2ban
|
||||
service:
|
||||
name: fail2ban
|
||||
state: restarted
|
||||
service: name=fail2ban state=restarted
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
---
|
||||
galaxy_info:
|
||||
role_name: fail2ban
|
||||
author: Adrien Waksberg
|
||||
company: Adrien Waksberg
|
||||
description: Install and configure fail2ban
|
||||
license: Apache2
|
||||
min_ansible_version: 2.5
|
||||
min_ansible_version: 2.4
|
||||
|
||||
platforms:
|
||||
- name: Debian
|
||||
|
|
|
@ -1,17 +1,11 @@
|
|||
---
|
||||
- name: install fail2ban packages
|
||||
apt:
|
||||
name: '{{ packages }}'
|
||||
name: '{{ item }}'
|
||||
state: present
|
||||
vars:
|
||||
packages:
|
||||
with_items:
|
||||
- fail2ban
|
||||
- whois
|
||||
- bsd-mailx
|
||||
register: result
|
||||
retries: 3
|
||||
delay: 1
|
||||
until: result is success
|
||||
tags: fail2ban
|
||||
|
||||
- name: remove default config
|
||||
|
@ -47,7 +41,7 @@
|
|||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
loop: '{{ fail2ban_filters }}'
|
||||
with_items: '{{ fail2ban_filters }}'
|
||||
notify: restart fail2ban
|
||||
tags: fail2ban
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
---
|
||||
- hosts: fail2ban
|
||||
connection: local
|
||||
vars:
|
||||
|
|
Loading…
Reference in a new issue