ansible playbook中使用迭代with_items案例_用户组
ansible playbook中使用迭代with_items案例_安装软件_02

with_items使用案例

案例:循环创建两个用户

ansible playbook中使用迭代with_items案例_用户组_03
ansible playbook中使用迭代with_items案例_知识_04
验证这两个用户是否已经创建成功:
ansible playbook中使用迭代with_items案例_批量删除_05
ansible playbook中使用迭代with_items案例_知识_06
ansible playbook中使用迭代with_items案例_知识_07

案例:批量删除目录

ansible playbook中使用迭代with_items案例_批量删除_08

案例:批量安装软件

ansible playbook中使用迭代with_items案例_知识_09

案例:批量拷贝目录

ansible playbook中使用迭代with_items案例_安装软件_10

案例:不同软件所属不同用户及用户组

字典的运用。
ansible playbook中使用迭代with_items案例_批量删除_11
ansible playbook中使用迭代with_items案例_批量删除_12

ansible playbook中使用迭代with_items案例_知识_13
检查:
ansible playbook中使用迭代with_items案例_安装软件_14
执行:
ansible playbook中使用迭代with_items案例_安装软件_15
验证:
ansible playbook中使用迭代with_items案例_批量删除_16
ansible playbook中使用迭代with_items案例_知识_17