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

@ -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