with 项目 - 简单列表
ansible 中的 with_items 循环可用于轻松循环值。
- name: Add lines to this file
  lineinfile: dest=/etc/file line={{ item }} state=present
  with_items:
    - Line 1
    - Line 2
    - Line 3
ansible 中的 with_items 循环可用于轻松循环值。
- name: Add lines to this file
  lineinfile: dest=/etc/file line={{ item }} state=present
  with_items:
    - Line 1
    - Line 2
    - Line 3