ansible实战- 循环创建多个用户

循环创建多个用户

bash 复制代码
- hosts: host2 #目标主机
  tasks:
  - name: add several users
    user: name={{ item }} state=present groups=wheel #wheel是组名,创建的用户需要添加的组
    with_items:
       - testuser1 #用户1
       - testuser2 #用户2
相关推荐
小-黯6 分钟前
Linux桌面入口文件.desktop文件内容格式
linux·运维·服务器
Serverless社区27 分钟前
探秘 AgentRun|基于 Serverless 的 AI Agent 沙箱工程化之路
运维·阿里云·云原生·serverless·函数计算
数智工坊1 小时前
【操作系统-IO调度】
java·服务器·数据库
475.351 小时前
linux-journal日志清理
linux·运维·服务器
小付爱coding2 小时前
跟着官网学LangChain【第01章:模型(Models)】
服务器·网络·langchain
Black__Jacket2 小时前
Ubuntu下,/dev下,无法读取到CH340串口芯片的端口号
linux·运维·ubuntu
小王不爱笑1322 小时前
云服务器部署 JavaWeb 项目
运维·服务器
清泉影月2 小时前
Linux:Squid正向代理实现内网访问互联网
linux·运维·服务器
霖霖总总2 小时前
[小技巧39]Linux 文件与命令查找工具(which、whereis、locate、find)全面解析
linux·运维
ayaya_mana2 小时前
在 CentOS 7/RHEL 7 上安装并切换至新版内核
linux·运维·centos