首页 > 其他分享 >循环控制语句 之 with_together

循环控制语句 之 with_together

时间:2023-01-20 10:44:55浏览次数:29  
标签:语句 name zip together 循环 debug

功能类似于:
列表元素数量上要一一对应

for i in zip([1,2,3],['a','b','c']):
 print(i)
- hosts: all
  tasks:
  - name: debug
    debug:
      msg: "{{ item }}"
    with_together:
    - ["a","b","c"]
    - [1,2,3]

标签:语句,name,zip,together,循环,debug
From: https://www.cnblogs.com/wangend/p/17062511.html

相关文章