break: change with_items to loop

This commit is contained in:
Adrien Waksberg 2018-11-29 20:35:49 +01:00
parent b058657992
commit 0598f74443
6 changed files with 11 additions and 10 deletions

View file

@ -17,7 +17,7 @@ provisioner:
platforms: platforms:
- name: debian-9 - name: debian-9
driver_config: driver_config:
image: "nishiki/debian9:ansible-<%= ENV['ANSIBLE_VERSION'] ? ENV['ANSIBLE_VERSION'] : '2.6' %>" image: "nishiki/debian9:ansible-<%= ENV['ANSIBLE_VERSION'] ? ENV['ANSIBLE_VERSION'] : '2.7' %>"
command: /bin/systemd command: /bin/systemd
volume: volume:
- /sys/fs/cgroup:/sys/fs/cgroup:ro - /sys/fs/cgroup:/sys/fs/cgroup:ro

View file

@ -3,7 +3,6 @@ sudo: required
language: ruby language: ruby
env: env:
- ANSIBLE_VERSION=2.4
- ANSIBLE_VERSION=2.5 - ANSIBLE_VERSION=2.5
- ANSIBLE_VERSION=2.6 - ANSIBLE_VERSION=2.6
- ANSIBLE_VERSION=2.7 - ANSIBLE_VERSION=2.7

View file

@ -4,6 +4,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
Which is based on [Keep A Changelog](http://keepachangelog.com/) Which is based on [Keep A Changelog](http://keepachangelog.com/)
## [Unreleased] ## [Unreleased]
* break: change with_items to loop
* test: add test with ansible 2.7 * test: add test with ansible 2.7
* test: add ansible-lint * test: add ansible-lint
* test: add yamllint * test: add yamllint

View file

@ -7,7 +7,7 @@ Install and configure Fail2ban
## Requirements ## Requirements
* Ansible >= 2.4 * Ansible >= 2.5
* Debian Stretch * Debian Stretch
## Role variables ## Role variables

View file

@ -5,7 +5,7 @@ galaxy_info:
company: Adrien Waksberg company: Adrien Waksberg
description: Install and configure fail2ban description: Install and configure fail2ban
license: Apache2 license: Apache2
min_ansible_version: 2.4 min_ansible_version: 2.5
platforms: platforms:
- name: Debian - name: Debian

View file

@ -1,9 +1,10 @@
--- ---
- name: install fail2ban packages - name: install fail2ban packages
apt: apt:
name: '{{ item }}' name: '{{ packages }}'
state: present state: present
with_items: vars:
packages:
- fail2ban - fail2ban
- whois - whois
- bsd-mailx - bsd-mailx
@ -42,7 +43,7 @@
owner: root owner: root
group: root group: root
mode: 0644 mode: 0644
with_items: '{{ fail2ban_filters }}' loop: '{{ fail2ban_filters }}'
notify: restart fail2ban notify: restart fail2ban
tags: fail2ban tags: fail2ban