配置ymal
配置主机组
[root@iZ2zee6df2m25shq6mfaw5Z ansible]# sudo vim /etc/ansible/hosts [hostname] 10.11.0.46 hostname=www.centoscn.vip
执行
[xiaoxin@iZ2zee6df2m25shq6mfaw5Z ansible]$ ansible-playbook install_hostname.ymal --extra-vars "ansible_ssh_user=root" PLAY [hostname] **************************************************************************************************************************** TASK [Gathering Facts] ********************************************************************************************************************* ok: [10.1.1.84] TASK [配置主机名] ******************************************************************************************************************************* changed: [10.1.1.84] TASK [shell] ******************************************************************************************************************************* changed: [10.1.1.84] PLAY RECAP ********************************************************************************************************************************* 10.1.1.84 : ok=3 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
查看

继续阅读
- 我的QQ
- QQ扫一扫
-
- 我的头条
- 头条扫一扫
-
评论