1
我想疊加2 with_item。Ansible與with_item的疊加
在我試過,但它不工作的時刻:
- name: Create log folder
file:
dest={{ item.dest }} # item from first with_item
state=directory
mode=0755
with_items:
{ dest: "{{ item.path_logs }}/gunicorn" } # item from flask apps
{ dest: "{{ item.path_logs }}/nginx" } # item from flask apps
{ dest: "{{ item.path_logs }}/supervisor" } # item from flask apps
with_items: "{{ flask_apps }}"
是否有可能做到這一點,或者我應該做3個任務?
仍然不清楚你在問什麼。 – helloV