break: change with_items to loop

This commit is contained in:
Adrien Waksberg 2018-12-01 08:00:35 +01:00
parent 3b682bee44
commit 22dd6dd8cd
6 changed files with 11 additions and 9 deletions

View file

@ -3,7 +3,6 @@ sudo: required
language: ruby
env:
- ANSIBLE_VERSION=2.4
- ANSIBLE_VERSION=2.5
- ANSIBLE_VERSION=2.6
- 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/)
## [Unreleased]
- BREAKING CHANGE: change with_items to loop
- test: add test with ansible 2.7
- test: add ansible-lint
- test: add yamllint

View file

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

View file

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

View file

@ -6,8 +6,7 @@
- name: install additionnal packages
package:
name: '{{ item }}'
with_items: '{{ phpfpm_packages }}'
name: '{{ phpfpm_packages }}'
tags: phpfpm
- name: create log directory

View file

@ -2,9 +2,12 @@
- name: check if pools log files exist
stat:
path: '{{ phpfpm_dir_log }}/{{ item[0].name }}.{{ item[1] }}'
with_nested:
- '{{ phpfpm_pools }}'
- ['slow.log', 'access.log', 'log']
loop: '{{ phpfpm_pools|product(log_files)|list }}'
vars:
log_files:
- slow.log
- access.log
- log
register: st
tags: phpfpm
@ -15,7 +18,7 @@
group: www-data
mode: 0640
state: touch
with_items: '{{ st.results }}'
loop: '{{ st.results }}'
when: not item.stat.exists
tags: phpfpm