Ansible使用基础之with_items循环字典

上一节中,介绍了使用loop循环列表,本节介绍使用with_items循环字典。

使用格式

在子任务中定义
with_items:
 - {key1:value1,key2,value2…}
 …

实例

需求: 创建多个用户
Ansible使用基础之with_items循环字典
Ansible使用基础之with_items循环字典