当前位置:网站首页>RHCE-ansible-第一次作业
RHCE-ansible-第一次作业
2022-07-17 00:16:00 【 ᝰꫛꫀꪝ】
1、以all主机组为目标执行id命令
[[email protected] test1]$ ansible all -m command -a ‘id’
2、使用copy模块修改所有主机上的/etc/motd文件内容为welcome to ansible
[[email protected] test1]$ ansible all -m copy -a ‘content=“welcome to ansible\n” dest=/etc/motd’
3、使用command模块查看/etc/motd文件的内容
[[email protected] test1]$ ansible all -m command -a ‘cat /etc/motd’
4、使用user模块创建用户wukong,uid为2000
[[email protected] test1]$ ansible all -m user -a ‘name=wukong uid=2000’
5、使用yum模块安装httpd软件包并使用service模块启动该服务
[[email protected] test1]$ ansible all -m yum -a ‘name=httpd’
[[email protected] test1]$ ansible all -m service -a ‘name=httpd state=started’
边栏推荐
- Chapter 1 - multi agent system
- Leetcode buckle classic question - 42 Connect rainwater
- 2022.6.28-database-1 Isolation level of database
- Reprint: SQL injection common bypass
- Understand inheritance, polymorphism, abstraction and their concepts
- 2022 latest software testing tools
- MySQL初探
- MySQL备份和恢复
- 数组、冒泡的认识
- 正则表达式
猜你喜欢
随机推荐
Leetcode --- one question per day
全链路压测
Leetcode 322: coin change - Dynamic Planning
ARM 交叉编译器命名规则
2022最新软件测试工具大全
LAMP平台部署及应用
CTFHub----RCE
Shortest circuit / secondary short circuit /k short circuit
Zabbix6.0监控vCenter7.0
[solution] the local Group Policy Editor (gpedit.msc) in Win 11 cannot be opened
WINRAR命令拷贝指定文件夹为压缩文件,调用计划任务进行备份。
Shell脚本变量、脚本编写和执行(部署Apache与远程备份MySQL数据库)
Convert string to integer
安装软件提示无法定位程序输入点AddDllDirectory于动态链接库Kernel32.dll上(文末有下载地址)
Uniapp wechat applet login (authorize wechat first and then mobile phone number) - (1)
Uni app wechat applet ordering system [another order] page Jump
Inverse yuan (I'll add these words if there are too many people using the name)
rsync远程同步(增量备份)
Swagger -- the most popular API framework in the world
Common English business mail phrases









