好男人视频社区,久久99国产精品尤物,大宫凉香电影,国外巨g乳熟妇av无码,天天日天天舔天天操,久久综合久色综合97婷婷,99久久久成人国产精品 ,4438亚洲最大色情网

自動化運維ansible學習筆記

/ 0評 / 0贊

#安裝ansible
yum -y install ansible

#編輯ansible主機清單
vim /etc/ansible/hosts

#生成密鑰對
ssh-keygen -t rsa -f /root/.ssh/id_rsa -N ''

#同步ssh密鑰
ssh-copy-id 192.168.12.12 -p 22

#連接ssh
ssh 192.168.12.12 -p 22

#執行ping命令
ansible 192.168.12.12 -m ping

[WARNING]: Platform linux on host 192.168.12.12 is using the discovered Python
interpreter at /usr/bin/python3.5, but future installation of another Python
interpreter could change this. See https://docs.ansible.com/ansible/2.9/reference_
appendices/interpreter_discovery.html for more information.
192.168.12.12 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python3.5"
},
"changed": false,
"ping": "pong"
}

#同步hosts文件
[root@localhost ~]# ansible 192.168.12.12 -m copy -a "src=/etc/hosts dest=/etc/hosts"

[WARNING]: Platform linux on host 192.168.12.12 is using the discovered Python
interpreter at /usr/bin/python3.5, but future installation of another Python
interpreter could change this. See https://docs.ansible.com/ansible/2.9/reference_
appendices/interpreter_discovery.html for more information.
192.168.12.12 | CHANGED => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python3.5"
},
"changed": true,
"checksum": "c200e5c586e263c00abed391f130ea016e4fe2a3",
"dest": "/etc/hosts",
"gid": 0,
"group": "root",
"md5sum": "e79557ef0184c8e2b887e1e6d9b8ed1a",
"mode": "0644",
"owner": "root",
"size": 181,
"src": "/root/.ansible/tmp/ansible-tmp-1698389078.95-103802-108612348163014/source",
"state": "file",
"uid": 0
}

建偉

發表評論

您的電子郵箱地址不會被公開。

這個站點使用 Akismet 來減少垃圾評論。了解你的評論數據如何被處理。