标签:item task pat ble mode 读取 nbsp ems mod
如下,with_items 是循环的对象,with_items 是 python list 数据结构,task 会循环读取 list 里面的值,key 的名称是 item
[root@localhost ~]$ cat while.yml --- - hosts: 192.168.119.134 user: root tasks: - name: touch file file: path=/tmp/{{ item }} state=touch mode=600 with_items: - 1.txt - 2.txt - 3.txt
标签:item task pat ble mode 读取 nbsp ems mod
原文地址:https://www.cnblogs.com/pzk7788/p/10215927.html