logo
  • 教程列表
  • SO官方文檔
  • Ansible 迴圈
    • 巢狀迴圈
    • with 專案 - 簡單列表
    • with 專案 - 預定義列表
    • with 專案 - 字典
    • with 專案 - 預定義的字典
  1. StackOverflow 文件
  2. Ansible 教程
  3. Ansible 迴圈
  4. with 專案 - 簡單列表

with 專案 - 簡單列表

Created: November-22, 2018

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
  • with 專案 - 預定義列表
  • 巢狀迴圈

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明